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)
About Flutter Architecture
wasabeef
0
150
2023 Flutter/Dart Summary
wasabeef
0
42
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
130
I/O Extended 2023 - Flutter 活用事例
wasabeef
11
2.7k
What it Takes to be a Flutter Developer
wasabeef
0
150
FlutterKaigi 2022 Keynote
wasabeef
1
540
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
Flutter Hooks, sometimes Jetpack Compose
wasabeef
3
1.7k
Other Decks in Programming
See All in Programming
Server Driven Compose With Firebase
skydoves
0
390
EventSourcingの理想と現実
wenas
6
2.1k
VR HMDとしてのVision Pro+ゲーム開発について
yasei_no_otoko
0
100
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
400
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
190
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
470
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
510
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
920
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
7
420
CSC509 Lecture 08
javiergs
PRO
0
100
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.6k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
167
14k
Building Your Own Lightsaber
phodgson
102
6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
Ruby is Unlike a Banana
tanoku
96
11k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Docker and Python
trallard
40
3.1k
The Cost Of JavaScript in 2023
addyosmani
45
6.6k
Done Done
chrislema
181
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Teambox: Starting and Learning
jrom
132
8.7k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
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.