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
130
2023 Flutter/Dart Summary
wasabeef
0
42
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
130
I/O Extended 2023 - Flutter 活用事例
wasabeef
11
2.6k
What it Takes to be a Flutter Developer
wasabeef
0
150
FlutterKaigi 2022 Keynote
wasabeef
1
530
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
Google Sign-inの移行から始めるCredential Manager活用
clockvoid
0
310
API Platform for Laravel
dunglas
1
400
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
140
How to Break into Reading Open Source
kaspth
2
220
Rubyとクリエイティブコーディングの輪の広がり / The Growing Circle of Ruby and Creative Coding
chobishiba
1
270
Ruby Parser progress report 2024
yui_knk
2
230
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
2
120
Understand the mechanism! Let's do screenshots tests of Compose Previews with various variations / 仕組みから理解する!Composeプレビューを様々なバリエーションでスクリーンショットテストしよう
sumio
3
800
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
170
LangGraphでのHuman-in-the-Loopの実装
os1ma
3
1.1k
watsonx.ai Dojo #2 生成AIを使ったアプリ開発入門編
oniak3ibm
PRO
0
190
仮想ファイルシステムを導入して開発環境のストレージ課題を解消する
segadevtech
2
550
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
517
39k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
How To Stay Up To Date on Web Technology
chriscoyier
786
250k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
1
54
Bash Introduction
62gerente
608
210k
Raft: Consensus for Rubyists
vanstee
135
6.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
VelocityConf: Rendering Performance Case Studies
addyosmani
322
23k
Practical Orchestrator
shlominoach
185
10k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
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.