How to bring your app out from the dust on the web thanks to App Links and App Indexing API. How to acquire new users for you mobile app and to re-engage existing ones thanks to Google Search.
15. How to test
adb shell am start -a android.intent.action.VIEW -d "http:
//example.com/gizmos" com.example.android
ADB
Deep link testing toolhttps://developers.google.com/app-indexing/android/test
22. How to implement
compile 'com.google.android.gms:play-services-appindexing:8.3.0' build.gradle
Uri APP_URI = Uri.parse("android-app://com.example/http/example.com/gizmos");
Uri WEB_URL = Uri.parse("http://www.example.com/index/"); URI definition
@Override
protected void onCreate(Bundle savedInstanceState) {
...
mClient = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
...
}
Google Client
23. App Indexing API - implementation
@Override
public void onStart() {
super.onStart();
...
// Connect your client
mClient.connect();
// Define a title for your current page, shown in autocompletion UI
String title = "Example Title";
// Construct the Action performed by the user
Action viewAction = Action.newAction(Action.TYPE_VIEW, title, WEB_URL, APP_URI);
// Call the App Indexing API start method after the view has completely rendered
AppIndex.AppIndexApi.start(mClient, viewAction);
...
}
24. App Indexing API - implementation
@Override
public void onStop() {
...
// Call end() and disconnect the client
String title = "App Indexing API Title";
Action viewAction = Action.newAction(Action.TYPE_VIEW, title, WEB_URL, APP_URI);
AppIndex.AppIndexApi.end(mClient, viewAction);
mClient.disconnect();
...
super.onStop();
}
25. Android
● Dev Bytes - https://www.youtube.com/watch?v=aISUYHTkTOU
● Dev Bytes - https://www.youtube.com/watch?v=kYLrK-gD2Yg
● Codelab
○ 1.http://search-codelabs.appspot.com/codelabs/android-deep-linking
○ 2.http://search-codelabs.appspot.com/codelabs/app-indexing
○ 3.http://search-codelabs.appspot.com/codelabs/web-deep-linking
● Blog post - http://googledevelopers.blogspot.com/2014/12/four-steps-to-supercharge-deep-
linking.html
● FAQ - https://developers.google.com/app-indexing/faq
● StackOverflow - http://stackoverflow.com/questions/tagged/android-app-indexing
iOS - Just from iOS 9
● Documentation - https://developers.google.com/app-indexing/ios/app
● Blog post - http://tinyurl.com/nmbrl4d
26. Thank you !
+Matteo Bonifazi - @mbonifazi
Senior Consultant @ Open Reply
Android GDE
matteobonifazi[at]gmail[dot].com