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
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
110
初めてDefinitelyTypedにPRを出した話
syumai
0
420
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
Contemporary Test Cases
maaretp
0
140
Click-free releases & the making of a CLI app
oheyadam
2
120
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Remix on Hono on Cloudflare Workers
yusukebe
1
300
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
受け取る人から提供する人になるということ
little_rubyist
0
250
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
150
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1366
200k
Git: the NoSQL Database
bkeepers
PRO
427
64k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Teambox: Starting and Learning
jrom
133
8.8k
It's Worth the Effort
3n
183
27k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Gamification - CAS2011
davidbonilla
80
5k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building an army of robots
kneath
302
43k
Producing Creativity
orderedlist
PRO
341
39k
Documentation Writing (for coders)
carmenintech
65
4.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
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.