protected override async void OnStop() { // Call End() and disconnect the client var title = "View Recipes"; var viewAction = AppIndexingAction.NewAction(Android.Gms.AppIndexing.Action.TypeView, title, WEB_URL, APP_URI); await AppIndex.AppIndexApi.EndAsync(googleApiClient, viewAction); googleApiClient.Disconnect(); base.OnStop(); }
protected override async void OnStart() { base.OnStart(); googleApiClient.Connect(); // Define a title for your current page, shown in autocompletion UI var title = "View Recipes"; // Construct the Action performed by the user var viewAction = AppIndexingAction.NewAction(Android.Gms.AppIndexing.Action.TypeView, title, WEB_URL, APP_URI); // Call the App Indexing API start method after the view has completely rendered await AppIndex.AppIndexApi.StartAsync(googleApiClient, viewAction); }