Upgrade to Pro — share decks privately, control downloads, hide ads and more …

App Links and Indexing to bring your app out fr...

uaMobiTech
November 14, 2015

App Links and Indexing to bring your app out from the dust

By Matteo Bonifazi - https://speakerdeck.com/dekra, http://www.slideshare.net/MatteoBonifazi
Nowadays making beautiful apps is just the first step to triumph in the mobile world. How can we increase the install base and how can we keep our users coming back to apps when they have been released in the marketplace? App link and App Indexing can help developers to easily achieve it.

uaMobiTech

November 14, 2015
Tweet

More Decks by uaMobiTech

Other Decks in Programming

Transcript

  1. +Matteo Bonifazi Senior Consultant @ Open Reply Android Google Developer

    Expert Member of GDG Rome @mbonifazi matteobonifazi[at]gmail[dot].com
  2. 1/3rd of them How many apps do you actually use

    daily? avg of 33 apps How many apps do you have installed in your phone? *Google research in Us
  3. Today 1Bilion of Web hostnames - 1 Milion of apps

    in Google Play 1B+ Web Hostnames 1M+ apps in Play Store
  4. Add deep link support to app Verify website Publish app

    deep links Done Step 1 Step 2 Step 3
  5. Add deep link support to app Verify website Publish app

    deep links Done Step 1 Step 2 Step 3
  6. <activity android:name="com.example.android.GizmosActivity" android:label="@string/title_gizmos" > <intent-filter android:label="@string/filter_title_viewgizmos"> <action android:name="android.intent.action.VIEW" /> <category

    android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <!-- Accepts URIs that begin with "http://example.com/gizmos” --> <data android:scheme="http" android:host="example.com" android:pathPrefix="/gizmos" /> </intent-filter> </activity>
  7. <activity android:name="com.example.android.GizmosActivity" android:label="@string/title_gizmos" > <intent-filter android:label="@string/filter_title_viewgizmos"> <action android:name="android.intent.action.VIEW" /> <category

    android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <!-- Accepts URIs that begin with "http://example.com/gizmos” --> <data android:scheme="http" android:host="example.com" android:pathPrefix="/gizmos" /> </intent-filter> </activity>
  8. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Intent intent=getIntent();

    String action=intent.getAction(); Uri data=intent.getData(); … Intent intentNext=new Intent(this, nextGizmosActivity.class); startActivity(intentNext); }
  9. How to test adb shell am start -a android.intent.action.VIEW -d

    "http: //example.com/gizmos" com.example.android ADB Deep link testing tool https://developers.google.com/app-indexing/android/test
  10. Add deep link support to app Verify website Publish app

    deep links Done Step 1 Step 2 Step 3
  11. • Create URL format for App Indexing • Add App

    Indexing Markup to your website • Verify your website on Webmaster Tools
  12. <link rel=“alternate” href=“android-app://com.example/http/example.com/gizmos” /> App Indexing markup Approve request on

    Webmaster Tools - https://www.google.com/webmasters/tools <html> <head> ... <link rel="alternate" href="android-app://com.example/http/example.com/gizmos" /> ... </head> <body> … </body> In the web page
  13. Add deep link support to app Verify website Publish app

    deep links Done Step 1 Step 2 Step 3
  14. 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
  15. 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); ... }
  16. 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(); }
  17. 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
  18. Thank you ! +Matteo Bonifazi - @mbonifazi Senior Consultant @

    Open Reply Android GDE matteobonifazi[at]gmail[dot].com