Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
introduction to DeepLinkDispatch
Search
Daichi Furiya (Wasabeef)
July 14, 2015
Programming
2
3.4k
introduction to DeepLinkDispatch
introduction to DeepLinkDispatch
Daichi Furiya (Wasabeef)
July 14, 2015
Tweet
Share
More Decks by Daichi Furiya (Wasabeef)
See All by Daichi Furiya (Wasabeef)
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
About Flutter Architecture
wasabeef
0
170
2023 Flutter/Dart Summary
wasabeef
0
46
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
140
I/O Extended 2023 - Flutter 活用事例
wasabeef
10
2.8k
What it Takes to be a Flutter Developer
wasabeef
0
160
FlutterKaigi 2022 Keynote
wasabeef
1
560
Flutter Hooks を使ったアプリ開発 / App Development with the Flutter Hooks
wasabeef
2
1.3k
Flutter 2021 の振り返りと今後のアプリ開発に向けて / Looking back on Flutter 2021 and for future app development.
wasabeef
4
2.1k
Other Decks in Programming
See All in Programming
Symfony Mapper Component
soyuka
2
730
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Go の GC の不得意な部分を克服したい
taiyow
2
770
暇に任せてProxmoxコンソール 作ってみました
karugamo
1
720
MCP with Cloudflare Workers
yusukebe
2
220
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
Jakarta EE meets AI
ivargrimstad
0
240
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
410
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
110
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
310
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Building Your Own Lightsaber
phodgson
103
6.1k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Statistics for Hackers
jakevdp
796
220k
How STYLIGHT went responsive
nonsquared
95
5.2k
A Philosophy of Restraint
colly
203
16k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Invisible Side of Design
smashingmag
298
50k
How GitHub (no longer) Works
holman
311
140k
Faster Mobile Websites
deanohume
305
30k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Transcript
DeepLinkDispatch potatotips #19 Wasabeef
About Me wasabeef CyberAgent, Inc.
DeepLinkDispatch
Airbnb, Inc.
DeepLinkDispatch • Simple • Annotation-based API • and Simple
Usage
Gradle buildscript { dependencies { classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' } } apply
plugin: 'com.neenbedankt.android-apt' dependencies { compile 'com.airbnb:deeplinkdispatch:1.2.+' apt 'com.airbnb:deeplinkdispatch-processor:1.2.+' }
AndroidManifest <activity android:name=“com.airbnb.deeplinkdispatch.DeepLinkActivity” android:theme=“@android:style/Theme.NoDisplay”> <intent-filter> <action android:name=“android.intent.action.VIEW” /> <category android:name=“android.intent.category.DEFAULT”
/> <category android:name=“android.intent.category.BROWSABLE” /> <data android:host=“wasabeef.jp” android:scheme=“http” /> <data android:host=“*” android:scheme=“wasabeef” /> </intent-filter> </activity>
Activity @DeepLinks({ “http://wasabeef.jp/deepLink/{id}”, “wasabeef://deepLink/{id}”, “wasabeef://anotherDeepLink” }) public class MainActivity extends
Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getIntent().getBooleanExtra(DeepLink.IS_DEEP_LINK, false)) { Bundle parameters = getIntent().getExtras(); String id = parameters.getString(id); // Do something with the ID... } ... } }
Method @DeepLink(“wasabeef://methodDeepLink/{param}”) public static Intent intentForDeepLinkMethod(Context context) { return new
Intent(context, MainActivity.class) .setAction(ACTION_DEEP_LINK_METHOD); }
Callbacks public class SampleApplication extends Application implements DeepLinkCallback { private
static final String TAG = DeepLinkDispatch; @Override public void onSuccess(String uri) { Log.i(“TAG, Successful deep link:” + uri.toString()); } @Override public void onError(DeepLinkError error) { Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName()); ComponentName componentName = intent.getComponent(); Intent mainIntent = IntentCompat.makeRestartActivityTask(componentName); startActivity(mainIntent); } }
Test adb shell am start -W -a android.intent.action.VIEW \ -d
"wasabeef://deepLink/deepLink"
Thanks.