Upload
justin-briggs
View
1.013
Download
2
Embed Size (px)
Citation preview
Search as an Interface
Visits to app,
not websites
Takes action on
your behalf
Hands free UI
(wearables)
Solutions, not
web pages
Search examples: http://blog.tackmobile.com/article/android-wear-gui-elements/
App Deep Links
android-app://{package_id}/{scheme}/{host_path}
ios-app://{itunes_id}/{scheme}/{host_path}
package_id - app ID in Play Store or iTunes App Store
scheme - http or custom scheme
host_path - specific content within app
Intent Filter: AndroidManifest.xml
Defines the structure of your
app URIs
<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" />
<!-- Accepts URIs that begin with "http://example.com/gizmos” -->
<data android:scheme="http"
android:host="example.com"
android:pathPrefix="/gizmos" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
Mange the Intent
Passes the incoming Intent
to a helper method
...
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gizmos);
onNewIntent(getIntent());
}
Mange the Intent
Verify the deep link and
display the gizmos content
protected void onNewIntent(Intent intent) {
String action = intent.getAction();
String data = intent.getDataString();
if (Intent.ACTION_VIEW.equals(action) && data != null) {
String gizmosId = data.substring(data.lastIndexOf("/") + 1);
Uri contentUri =
GizmosContentProvider.CONTENT_URI.buildUpon()
.appendPath(gizmosId).build();
showGizmos(contentUri);
}
Setup Inter-App Communication
openURL: method launches the app
with the registered scheme and
passes your URL to it
Setup Google’s SDK
This is required to have iOS deep links
#1 Install CocaPods
#2 Add GoogleAppIndexing Pod
#3 Add GoogleAppIndexing post to your Xcode project
#4 Update your code to use SDK and to make API call to handle
back button
Express Interest to Google
https://developers.google.com/app-indexing/ios/interest-form
iOS App Indexing is a limited release
Test With Android Debug Bridge
This will kick open “page” on
mobile device from console
adb shell am start -a android.intent.action.VIEW -d
"http://example.com/gizmos" com.example.android
Test With Xcrun Tool
This will kick open “page” on
mobile device from console
xcrun simctl openurl YOUR-DEVICE-UUID gsd-
gizmos://123456/?google-deep-
link=gizmos%3A%2F%2Fabcd&google-callback-
url=googleapp%3A%2F%2F&google-min-sdk-
version=1.0.0
Test In The Wild (HTML)
Opens app from web page
<a href="intent://example.com/gizmos#Intent;scheme=http;
package=com.example.android;end;">http://example.com/gizmos</a>
<a href="gsd-gizmos://123456/?google-deep-
link=gizmos%3A%2F%2Fabcd&google-callback-
url=googleapp%3A%2F%2F&google-min-sdk-version=1.0.0">
gizmos://abcd</a>
Three Ways to Expose App URI
<html>
<head>
...
<link rel="alternate" href="android-
app://com.example.android/http/example.co
m/gizmos" />
...
</head>
<body> … </body>
Rel=“alternate”
ViewAction
XML Sitemap
Three Ways to Expose App URI
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebPage",
"@id": "http://example.com/gizmos",
"potentialAction": {
"@type": "ViewAction",
"target": "android-
app://com.example.android/http/example.co
m/gizmos"
}
}
</script>
Rel=“alternate”
ViewAction
XML Sitemap
Three Ways to Expose App URI
<?xml version="1.0" encoding="UTF-8" ?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitem
ap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://example.com/gizmos</loc>
<xhtml:link rel="alternate" href="android-
app://com.example.android/example/gizmos" />
</url>
...
</urlset>
Rel=“alternate”
ViewAction
XML Sitemap
Average Lift of 0.29 Positions
0.19
0.48
0.29
0
0.1
0.2
0.3
0.4
0.5
0.6
Rank Lift Over Desktop
App Indexing Ranking Boost
Mobile (Not Installed) Mobile (Installed) Net Benefit
Indexing Control for Apps
<?xml version="1.0" encoding="utf-8"?>
<search-engine
xmlns:android="http://schemas.android.com/apk/res/android"
>
<noindex uri="http://example.com/gizmos/hidden_uri"/>
<noindex
uriPrefix="http://example.com/gizmos/hidden_prefix"/>
<noindex uri="gizmos://hidden_path"/>
<noindex uriPrefix="gizmos://hidden_prefix"/>
</search-engine>
App Resource
Directory
Android Manifest
Indexing Control for Apps
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.Gizmos">
<application>
<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"/>
...
</activity>
<meta-data android:name="search-engine"
android:resource="@xml/noindex"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
App Resource
Directory
Android Manifest
Leverage Schema.org Actions
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "MusicGroup",
"name": "Weezer", "potentialAction": {
"@type": "ListenAction",
"target": "android-app://com.spotify.music/http/we.../listen"
}
}
</script>
Building an Action Graph
Play the Taylor Swift song about hatersAction Entity Listen Action Traditional Keyword Match
55% of teens and 41% of adults use voice search more than 1 time a day
- Google’s Mobile Voice Study
App Links Markup
<head>
<meta property="al:ios:url" content="example://?id=12345678" />
<meta property="al:ios:app_store_id" content="12345678" />
<meta property="al:android:url" content="example://?id=12345678" />
<meta property="al:android:package" content="com.example.www" />
</head>
Schema.org App Actions<script type="application/ld+json">
{ "@context": "http://schema.org",
"@type": "Book",
"additionalType" : "http://www.productontology.org/id/Audiobook">
"name": "Coraline",
"author" : "Neil Gaiman",
"isbn" : "9781937091415",
"potentialAction":
{
"@type": "PlayAction",
"target": [
"http://www.audible.com/pd/Kids/Coraline-Audiobook/B0036GTJ48",
{
"@type": "EntryPoint",
"urlTemplate": "audible://listennow?asin=B0036GTJ48&title=Coraline",
"application": {
"@type": "SoftwareApplication",
"@id": "bdc813dd-c20b-41f8-8646-de72fa0b365d"
"name": "Audible",
"operatingSystem": "Windows Phone 8.1"
}
] } } </script>