don't let your mobile app get lost - ios spotlight and app indexing
TRANSCRIPT
![Page 1: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/1.jpg)
Don't Let Your Mobile App Get Lost
James MontemagnoDeveloper Evangelist, Xamarin
![Page 2: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/2.jpg)
Who’s this guy?
JamesMontemagnoDeveloperEvangelist,Xamarin
[email protected] motzcod.es @JamesMontemagno
![Page 3: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/3.jpg)
Let’s go back to 1997!
• TV: • SouthPark,BuffytheVampireSlayer,&KingoftheHill
• Movies:• StarWarsEpisodeIV- VItheatricalre-releases!• Titanicgrossedover$1billion• StarshipTroopersreleases!
• Games:• FinalFantasyVIIreleases!Sells2Min3days!• GoldenEye 007destroysmychildhood
• Me:• Iturned11!• IgothookedonTamagotchi• IfoundtheInternet!
![Page 4: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/4.jpg)
The Internet in 1997!
![Page 5: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/5.jpg)
![Page 6: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/6.jpg)
![Page 7: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/7.jpg)
![Page 8: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/8.jpg)
![Page 9: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/9.jpg)
App Stores Today
![Page 10: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/10.jpg)
We Apps!
189Mdownloads
a day
200mins on phone
127mins in
apps
![Page 11: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/11.jpg)
How many do we actually use?
![Page 12: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/12.jpg)
The average app user has 36 apps installed on his or her phone.
![Page 13: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/13.jpg)
Only 1/4 are used daily:
![Page 14: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/14.jpg)
1/4 of apps are never used!
![Page 15: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/15.jpg)
My Phone
117 Apps107 “Non-system” Apps!
![Page 16: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/16.jpg)
Used Today
17
![Page 17: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/17.jpg)
Mobile search is a key way for users to discover and engage with your app’s content.
![Page 18: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/18.jpg)
Discover & Engage
![Page 19: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/19.jpg)
SDKs in our toolkit:
• iOS Spotlight Search• Google App Indexing• More:• FacebookAppLinks• TwitterCards• Schema.org Actions• iOSUniversalLinking
![Page 20: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/20.jpg)
iOS Search APIs
NSUserActivity• Handoff Enabled• Pieces of Content
& Pages• When user views• Ability to save
state of screen• Less Data• More Functionality
Core Spotlight• Pre-Indexing Entire
App’s Content• Full set or Part of
set
• More Data • Less Functionality
Web Markup• Deep linking
from web
![Page 21: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/21.jpg)
NSUserActivity: Index Activities
![Page 22: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/22.jpg)
NSUserActivity
• Set “Activity”• Add metadata• Save “Activity”
![Page 23: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/23.jpg)
NSUserActivity CreateActivity(){
var activity = new NSUserActivity("com.xamarin.monkeys.monkey");activity.EligibleForSearch = true;activity.EligibleForPublicIndexing = true;activity.EligibleForHandoff = false;activity.Title = monkey.Name;
activity.Keywords = new NSSet<NSString>(new NSString(monkey.Name),new NSString("Monkey"));
var attributeSet = new CoreSpotlight.CSSearchableItemAttributeSet ();attributeSet.ContentDescription = monkey.Details;activity.ContentAttributeSet = attributeSet;
var info = NSDictionary.FromObjectAndKey(new NSString(monkey.Name),new NSString("Name"));
activity.AddUserInfoEntries(info);
return activity;}
Create Activity
![Page 24: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/24.jpg)
public override void ViewWillAppear(){
base.ViewWillAppear();
UserActivity = CreateActivity();UserActivity.BecomeCurrent();
}
public override void ViewWillDisappear(bool animated){
base.ViewWillDisappear(animated);UserActivity.ResignCurrent();
}
Set Activity
![Page 25: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/25.jpg)
public override void UpdateUserActivityState (NSUserActivity activity){
// update activityvar info = NSDictionary.FromObjectAndKey(new NSString(monkey.Name),
new NSString("Name"));activity.AddUserInfoEntries(info);
base.UpdateUserActivityState (activity);}
Update State
![Page 26: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/26.jpg)
Respondpublic override bool ContinueUserActivity (UIApplication application,
NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler){
// Take action based on the activity typeswitch (userActivity.ActivityType) {
case "com.xamarin.monkeys.monkey":var uid = userActivity.UserInfo.ObjectForKey((NSString)"Name").ToString();
break;}
return true;}
![Page 27: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/27.jpg)
Let’s Search Monkeys!
![Page 28: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/28.jpg)
Google App Indexing
• Put your app in front of users in Google Search
![Page 29: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/29.jpg)
• iOS• Promote Search Results• Deep Link Content• Enhance Display Elements
App Indexing Features•Android• Promote Search Results• Deep Link Content• Enhance Display Elements• Drive Installs: better ranking
signal for all Urls• Query Auto completions • Now on Tap
![Page 30: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/30.jpg)
• In Google SearchSearch Better
• Connect your Site to App
![Page 31: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/31.jpg)
Add support for links (http) and App Indexing API in app
How to index your app
1
2
3
Verify you app against your site on Google Play Developer Console
Publish links (over API)
![Page 32: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/32.jpg)
![Page 33: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/33.jpg)
Add IntentFilter[IntentFilter(new []{ Intent.ActionView },
Categories = new []{
Android.Content.Intent.CategoryDefault,Android.Content.Intent.CategoryBrowsable
},DataScheme = "http",DataHost = "monkeysapp.com",DataPathPrefix ="/Home/Detail/")]
public class MainActivity : BaseActivity{}
![Page 34: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/34.jpg)
Handle Intentprotected override void OnNewIntent(Intent intent){
base.OnNewIntent(intent);var action = intent.Action;var data = intent.DataString;if (Intent.ActionView != action || string.IsNullOrWhiteSpace(data))
return;//only if deep linkingif (!data.Contains("/Home/Detail/"))
return;
var monkeyId = data.Substring(data.LastIndexOf("/", StringComparison.Ordinal) + 1).Replace("%20", " ");
if (!string.IsNullOrWhiteSpace(monkeyId)){
var i = new Intent(this, typeof(DetailsActivity));i.PutExtra("Name", monkeyId);StartActivity(i);
}}
![Page 35: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/35.jpg)
![Page 36: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/36.jpg)
![Page 37: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/37.jpg)
google.com/webmasters
![Page 38: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/38.jpg)
![Page 39: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/39.jpg)
![Page 40: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/40.jpg)
Install App Indexing NuGet
![Page 41: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/41.jpg)
Create “Content Action”GoogleApiClient client;protected override void OnCreate(Android.OS.Bundle savedInstanceState){
base.OnCreate(savedInstanceState);client = new GoogleApiClient.Builder(this).AddApi(AppIndex.API).Build();
}
public IndexingAction AppIndexAction{
get{
var item = new Thing.Builder().SetName(title).SetDescription(description).SetUrl(Android.Net.Uri.Parse(url)).SetType(schemaType).SetId(url).Build();
var thing = new IndexingAction.Builder(IndexingAction.TypeView).SetObject(item).SetActionStatus(IndexingAction.StatusTypeCompleted).Build();
return thing.JavaCast<IndexingAction>();}
![Page 42: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/42.jpg)
Index the Contentprotected override async void OnStart(){
base.OnStart();client.Connect();await AppIndex.AppIndexApi.StartAsync(client, AppIndexAction);
}
protected override async void OnStop(){
base.OnStop();await AppIndex.AppIndexApi.EndAsync(client, AppIndexAction);client.Disconnect();
}
![Page 43: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/43.jpg)
![Page 44: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/44.jpg)
Test Integration in Console
![Page 45: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/45.jpg)
Let’s Search More Monkeys!
![Page 46: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/46.jpg)
iOS 9 App Indexing?
• Simply Add Universal Links (Web Markup)• Integrate Deep Links in ApplicationDelegate• Add app-to-site association in Info.plist• Install App Indexing Component for iOS• Call: GSDAppIndexing.SharedInstance.RegisterApp(“ITUNES_ID”);• DONE!
![Page 47: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/47.jpg)
We can do more!
• Developer Accounts• Google Search• Voice Interactions• App Invites
![Page 48: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/48.jpg)
Developer Accounts
Turn This:
![Page 49: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/49.jpg)
Developer Accounts
Into this:
![Page 50: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/50.jpg)
Google Developer Console
![Page 51: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/51.jpg)
OK Google,
https://blog.xamarin.com/add-a-conversation-to-your-android-app-with-voice-interactions/
![Page 52: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/52.jpg)
Voice Interactions
– Build conversational voice experiences into app
– Extend System Voice Actions– Interact with your users
![Page 53: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/53.jpg)
![Page 54: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/54.jpg)
App Invites– Allow users to share apps– Email or SMS– Deep Link Content– Provide exclusive content
![Page 55: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/55.jpg)
App Invites
![Page 56: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/56.jpg)
Don’t let your app get lost!
• Leverage Search and have your users coming back for more• Connect your website and mobile app for a rich experience• Add unique features to bring more users
![Page 57: Don't let your mobile app get lost - iOS Spotlight and App Indexing](https://reader034.vdocument.in/reader034/viewer/2022042611/5878bb611a28ab724c8b779b/html5/thumbnails/57.jpg)
Thankyou.
JamesMontemagnoDeveloper Evangelist, Xamarin
[email protected] motzcod.es @JamesMontemagno
slideshare.net/JamesMontemagno