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.3k
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
51
2023 Flutter/Dart Summary
wasabeef
0
12
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
100
I/O Extended 2023 - Flutter 活用事例
wasabeef
10
2.3k
What it Takes to be a Flutter Developer
wasabeef
0
130
FlutterKaigi 2022 Keynote
wasabeef
1
490
Flutter Hooks を使ったアプリ開発 / App Development with the Flutter Hooks
wasabeef
2
1.2k
Flutter 2021 の振り返りと今後のアプリ開発に向けて / Looking back on Flutter 2021 and for future app development.
wasabeef
4
2k
Flutter Hooks, sometimes Jetpack Compose
wasabeef
3
1.6k
Other Decks in Programming
See All in Programming
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
370
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
370
Rethinking UI building strategies @ SFI 2024
letelete
0
270
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
730
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
Tailwind CSSを本気でカスタマイズする方法
fsubal
13
5.3k
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
320
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
170
Netty Chicago Java User Group 2024-04-17
sullis
0
180
Changed Rules: Architectures with Lightweight Stores
manfredsteyer
PRO
0
240
Elm 0.19.0 Changes
bkuhlmann
0
490
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
274
13k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
GitHub's CSS Performance
jonrohan
1025
450k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
241
1.2M
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
322
20k
Git: the NoSQL Database
bkeepers
PRO
422
63k
How to name files
jennybc
65
93k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
116
18k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.6k
Bootstrapping a Software Product
garrettdimon
PRO
302
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.