6. DroidCon
airbnb://rooms/5259603
etsy://listing/190881511
ebay://link/?nav=item.view&id=161640221974&referrer=ebay.com&min_version=17
android-‐app://com.airbnb.android/airbnb/rooms/5259603
and
even:
http://sub.domain.com/path?param=value
Deep Links – Real World Examples
http://example.com/over/there?param=value
scheme domain path query
16. DroidCon
"Deep links to your app appear
in Google Search results on
Android so users can get to your
native mobile experience quickly
and easily."
Source: Google Developer's Website
Why: Growth & Engagement
24. DroidCon
How: Defining Deep Links
• Android
• Define intent filters in the app manifest
• Should have at least one intent filter per deeplinkable activity
• The intent filter should have a data tag with at least the android:scheme
attribute set
• Handling the intent in the activity
26. DroidCon
Example: Defining Deep Links – Handling the Intent
@Override
public
void
onCreate(Bundle
savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent
intent
=
getIntent();
Uri
data
=
intent.getData();
String
path
=
data.getPath();
}
27. DroidCon
Publishing – Do you have a website?
<!–-‐
Google
App
Indexing
-‐-‐>
<link
href="android-‐app://com.yelp.android/yelp-‐app-‐indexing/biz/
PbwkBPAyw"/>
<!–-‐
Facebook’s
AppLink
-‐-‐>
<meta
property="al:android:url"
content="etsy://listing/190881511"/>
<!–-‐
Twitter’s
Card
-‐-‐>
<meta
name="twitter:app:url:googleplay"
value="etsy://listing/19881511"/>
<!–-‐
AppURL
-‐-‐>
<link
type="x-‐edition/android-‐newest"
href="http://example.com/123"/>
28. DroidCon
Example: Publishing – Web to Native – Google App Indexing
<link
href="android-‐app://com.yelp.android/yelp-‐app-‐indexing/biz/
PbwkBPpiXqKQR7fPJvGAyw?
utm_campaign=biz_details&utm_medium=organic&utm_source=google"
rel="alternate"
/>
<link
href="ios-‐app://284910350/yelp/biz/PbwkBPpiXqKQR7fPJvGAyw?
utm_campaign=biz_details&utm_medium=organic&utm_source=google"
rel="alternate"
/>
29. DroidCon
Example: Publishing – Web to Native Sitemap –
Google App Indexing
<?xml
version="1.0"
encoding="UTF-‐8"
?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://grid6.us/example1</loc>
<xhtml:link
rel="alternate"
href="android-‐app://us.grid6/http/
grid6.us/example1"
/>
</url>
</urlset>
30. DroidCon
Publishing – only have an app?
• Publish Directly to Google using GoogleApiClient, from the Activity,
during client run-time.
GoogleApiClient
mClient
=
new
GoogleApiClient.Builder(this).
addApi(AppIndex.APP_INDEX_API).build();
//
inside
onCreate
AppIndex.AppIndexApi.view(mClient,
<page
data>);
//
inside
onStart
31. DroidCon
Mobile Deep Linking
• Powerful for users
• Can help drive growth, engagement and monetization
• Easy to implement