32
DroidCon Deep Linking 101 June 2015 Naor Rosenberg – Manager, Developer Network Engineering Team

Deeplinking 101 - Naor Rosenberg, Quixey

Embed Size (px)

Citation preview

DroidCon

Deep Linking 101 June 2015

Naor Rosenberg – Manager, Developer Network Engineering Team

DroidCon

Agenda

•  What are deep links?

•  Why are deep links useful for developers? For users?

•  How do I implement deep linking?

DroidCon

What: Web Deep Linking

http://example.com/over/there?param=value scheme domain path query

DroidCon

What: Mobile Deep Linking

DroidCon

What: Mobile Deep Linking

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

DroidCon

What: Mobile Deep Linking

DroidCon

Agenda

•  What are deep links?

•  Why are deep links useful for developers? For users?

•  How do I implement deep linking?

DroidCon

Why: Growth & Engagement

•  How many apps are downloaded per month?

DroidCon

Why: Growth

DroidCon

Why: Growth

DroidCon

Example: Need a Ride Home?

DroidCon

taxi

DroidCon

Why: Growth & Engagement

Evolving Search for the Mobile Era

DroidCon

THE BIG GUYS ARE ALREADY THERE

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

DroidCon

Why: Engagement & Growth

Apple,  June  8th  2015    

DroidCon

Microso7  Bing,  May  21st  2015    

DroidCon

Growth & Monetization: Cross-promotion of app functions will create the

highway of the future mobile ecosystem

DroidCon

Solution: Connect a Grid System of Apps

*Source: Happy family iz happy by Frédéric de Villamil / CC BY-SA 2.0

DroidCon

Creating a Seamless Experience

DroidCon

Agenda

•  What are deep links?

•  Why are deep links useful for developers? For users?

•  How do I implement deep linking?

DroidCon

How: Strategies

Defining • Manifest.xml: add

intent-filter • Handle intents in

the Activity

Publishing • Web to Native

Mappings • Stand-alone Native

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

DroidCon

Example: Defining Deep Links – Intent Filters

<!-­‐-­‐  airbnb://rooms/5259603  -­‐-­‐>  

<activity  android:name="com.airbnb.ShowRoom”>  

 <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:scheme="airbnb"  android:host="rooms"  />  

 </intent-­‐filter>  

</activity>  

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();  

}  

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"/>  

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&amp;utm_medium=organic&amp;utm_source=google"  

rel="alternate"  />    

   

<link  href="ios-­‐app://284910350/yelp/biz/PbwkBPpiXqKQR7fPJvGAyw?

utm_campaign=biz_details&amp;utm_medium=organic&amp;utm_source=google"  

rel="alternate"  />  

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>  

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  

DroidCon

Mobile Deep Linking

•  Powerful for users •  Can help drive growth, engagement and monetization

•  Easy to implement

DroidCon

Thank You! [email protected]

https://www.linkedin.com/in/naorrosenberg