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
160
2023 Flutter/Dart Summary
wasabeef
0
45
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
140
I/O Extended 2023 - Flutter 活用事例
wasabeef
11
2.8k
What it Takes to be a Flutter Developer
wasabeef
0
160
FlutterKaigi 2022 Keynote
wasabeef
1
550
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.8k
Other Decks in Programming
See All in Programming
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
初めてDefinitelyTypedにPRを出した話
syumai
0
410
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
ヤプリ新卒SREの オンボーディング
masaki12
0
130
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
290
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Jakarta EE meets AI
ivargrimstad
0
180
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Featured
See All Featured
KATA
mclloyd
29
14k
Designing for humans not robots
tammielis
250
25k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Six Lessons from altMBA
skipperchong
27
3.5k
Bash Introduction
62gerente
608
210k
Become a Pro
speakerdeck
PRO
25
5k
Practical Orchestrator
shlominoach
186
10k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
The Language of Interfaces
destraynor
154
24k
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.