com.google.android.gms.appindexing.Action Java Examples
The following examples show how to use
com.google.android.gms.appindexing.Action.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OcrCaptureActivity.java From Document-Scanner with GNU General Public License v3.0 | 6 votes |
@Override public void onStart() { super.onStart(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. client.connect(); Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "OcrCapture Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://com.myapps.documentscanner/http/host/path") ); AppIndex.AppIndexApi.start(client, viewAction); }
Example #2
Source File: MainActivity.java From PolarHeartRateApplication with MIT License | 6 votes |
public void onStop() { super.onStop(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Main Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://org.marco45.polarheartmonitor/http/host/path") ); AppIndex.AppIndexApi.end(client, viewAction); client.disconnect(); }
Example #3
Source File: MainActivity.java From PolarHeartRateApplication with MIT License | 6 votes |
public void onStart() { super.onStart(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. client.connect(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Main Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://org.marco45.polarheartmonitor/http/host/path") ); AppIndex.AppIndexApi.start(client, viewAction); }
Example #4
Source File: SettingActivity.java From dttv-android with GNU General Public License v3.0 | 6 votes |
@Override public void onStop() { super.onStop(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Setting Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://dttv.app/http/host/path") ); AppIndex.AppIndexApi.end(client, viewAction); client.disconnect(); }
Example #5
Source File: SettingActivity.java From dttv-android with GNU General Public License v3.0 | 6 votes |
@Override public void onStart() { super.onStart(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. client.connect(); Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Setting Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://dttv.app/http/host/path") ); AppIndex.AppIndexApi.start(client, viewAction); }
Example #6
Source File: RecipeActivity.java From io2015-codelabs with Apache License 2.0 | 6 votes |
@Override public void onStop(){ if (recipe != null) { final String TITLE = recipe.getTitle(); final Uri APP_URI = BASE_APP_URI.buildUpon().appendPath(recipe.getId()).build(); Action viewAction = Action.newAction(Action.TYPE_VIEW, TITLE, APP_URI); PendingResult<Status> result = AppIndex.AppIndexApi.end(mClient, viewAction); result.setResultCallback(new ResultCallback<Status>() { @Override public void onResult(Status status) { if (status.isSuccess()) { Log.d(TAG, "App Indexing API: Recorded recipe " + recipe.getTitle() + " view end successfully."); } else { Log.e(TAG, "App Indexing API: There was an error recording the recipe view." + status.toString()); } } }); mClient.disconnect(); super.onStop(); } }
Example #7
Source File: MyActivity.java From AndroidLEDcontrol with MIT License | 6 votes |
@Override public void onStop() { super.onStop(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "My Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app deep link URI is correct. Uri.parse("android-app://com.hishri.fnarduino/http/host/path") ); AppIndex.AppIndexApi.end(client, viewAction); client.disconnect(); }
Example #8
Source File: OcrCaptureActivity.java From Document-Scanner with GNU General Public License v3.0 | 6 votes |
@Override public void onStop() { super.onStop(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "OcrCapture Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://com.myapps.documentscanner/http/host/path") ); AppIndex.AppIndexApi.end(client, viewAction); client.disconnect(); }
Example #9
Source File: MainActivity.java From chaoli-forum-for-android-2 with GNU General Public License v3.0 | 6 votes |
@Override public void onStop() { super.onStop(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Main Page", // TODO: Define a mTitle for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://com.daquexian.chaoli.forum/http/host/path") ); AppIndex.AppIndexApi.end(client, viewAction); client.disconnect(); }
Example #10
Source File: MainActivity.java From chaoli-forum-for-android-2 with GNU General Public License v3.0 | 6 votes |
@Override public void onStart() { super.onStart(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. client.connect(); Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Main Page", // TODO: Define a mTitle for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://com.daquexian.chaoli.forum/http/host/path") ); AppIndex.AppIndexApi.start(client, viewAction); }
Example #11
Source File: MainActivity.java From Android-Audio-Recorder with Apache License 2.0 | 6 votes |
@Override public void onStop() { super.onStop(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Main Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app deep link URI is correct. Uri.parse("android-app://com.github.axet.audiorecorder/http/host/path") ); AppIndex.AppIndexApi.end(client, viewAction); client.disconnect(); }
Example #12
Source File: MainActivity.java From Android-Audio-Recorder with Apache License 2.0 | 6 votes |
@Override public void onStart() { super.onStart(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. client.connect(); Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Main Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app deep link URI is correct. Uri.parse("android-app://com.github.axet.audiorecorder/http/host/path") ); AppIndex.AppIndexApi.start(client, viewAction); }
Example #13
Source File: MainActivity.java From ibm-wearables-android-sdk with Apache License 2.0 | 6 votes |
@Override public void onStop() { super.onStop(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Main Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://com.ibm.mobilefirst.mobileedge.demoapp/http/host/path") ); AppIndex.AppIndexApi.end(client, viewAction); client.disconnect(); }
Example #14
Source File: MainActivity.java From ibm-wearables-android-sdk with Apache License 2.0 | 6 votes |
@Override public void onStart() { super.onStart(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. client.connect(); Action viewAction = Action.newAction( Action.TYPE_VIEW, // TODO: choose an action type. "Main Page", // TODO: Define a title for the content shown. // TODO: If you have web page content that matches this app activity's content, // make sure this auto-generated web page URL is correct. // Otherwise, set the URL to null. Uri.parse("http://host/path"), // TODO: Make sure this auto-generated app URL is correct. Uri.parse("android-app://com.ibm.mobilefirst.mobileedge.demoapp/http/host/path") ); AppIndex.AppIndexApi.start(client, viewAction); }
Example #15
Source File: BrowserActivity.java From EFRConnect-android with Apache License 2.0 | 5 votes |
/** * ATTENTION: This was auto-generated to implement the App Indexing API. * See https://g.co/AppIndexing/AndroidStudio for more information. */ public Action getIndexApiAction() { Thing object = new Thing.Builder() .setName("BrowserActivity Page") // TODO: Define a title for the content shown. // TODO: Make sure this auto-generated URL is correct. .setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]")) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); }
Example #16
Source File: SkypeCall.java From skype-android-app-sdk-samples with MIT License | 5 votes |
/** * ATTENTION: This was auto-generated to implement the App Indexing API. * See https://g.co/AppIndexing/AndroidStudio for more information. */ public Action getIndexApiAction() { Thing object = new Thing.Builder() .setName("SkypeCall Page") // TODO: Define a title for the content shown. // TODO: Make sure this auto-generated URL is correct. .setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]")) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); }
Example #17
Source File: MainActivity.java From Learning-Resources with MIT License | 5 votes |
public Action getAction() { Thing object = new Thing.Builder() .setName(mTitle) .setDescription(mDescription) .setUrl(mUrl) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); }
Example #18
Source File: LoginActivity.java From FaceT with Mozilla Public License 2.0 | 5 votes |
/** * ATTENTION: This was auto-generated to implement the App Indexing API. * See https://g.co/AppIndexing/AndroidStudio for more information. */ public Action getIndexApiAction() { Thing object = new Thing.Builder() .setName("Login Page") // TODO: Define a title for the content shown. // TODO: Make sure this auto-generated URL is correct. .setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]")) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); }
Example #19
Source File: RecipeActivity.java From io2015-codelabs with Apache License 2.0 | 5 votes |
@Override public void onStart(){ super.onStart(); if (recipe != null) { // Connect your client mClient.connect(); // Define a title for your current page, shown in autocompletion UI final String TITLE = recipe.getTitle(); final Uri APP_URI = BASE_APP_URI.buildUpon().appendPath(recipe.getId()).build(); Action viewAction = Action.newAction(Action.TYPE_VIEW, TITLE, APP_URI); // Call the App Indexing API view method PendingResult<Status> result = AppIndex.AppIndexApi.start(mClient, viewAction); result.setResultCallback(new ResultCallback<Status>() { @Override public void onResult(Status status) { if (status.isSuccess()) { Log.d(TAG, "App Indexing API: Recorded recipe " + recipe.getTitle() + " view successfully."); } else { Log.e(TAG, "App Indexing API: There was an error recording the recipe view." + status.toString()); } } }); } }
Example #20
Source File: ChatActivity.java From DirectLineAndroidSample with MIT License | 5 votes |
/** * ATTENTION: This was auto-generated to implement the App Indexing API. * See https://g.co/AppIndexing/AndroidStudio for more information. */ public Action getIndexApiAction() { Thing object = new Thing.Builder() .setName("Chat Page") // TODO: Define a title for the content shown. // TODO: Make sure this auto-generated URL is correct. .setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]")) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); }
Example #21
Source File: TheHubActivity.java From ToDay with MIT License | 5 votes |
/** * ATTENTION: This was auto-generated to implement the App Indexing API. * See https://g.co/AppIndexing/AndroidStudio for more information. */ public Action getIndexApiAction() { Thing object = new Thing.Builder() .setName("TheHub Page") // TODO: Define a title for the content shown. // TODO: Make sure this auto-generated URL is correct. .setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]")) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); }
Example #22
Source File: ToDayStateActivity.java From ToDay with MIT License | 5 votes |
/** * ATTENTION: This was auto-generated to implement the App Indexing API. * See https://g.co/AppIndexing/AndroidStudio for more information. */ public Action getIndexApiAction() { Thing object = new Thing.Builder() .setName("ToDayState Page") // TODO: Define a title for the content shown. // TODO: Make sure this auto-generated URL is correct. .setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]")) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); }
Example #23
Source File: LinkMobileActivity.java From Android with MIT License | 5 votes |
/** * ATTENTION: This was auto-generated to implement the App Indexing API. * See https://g.co/AppIndexing/AndroidStudio for more information. */ public Action getIndexApiAction() { Thing object = new Thing.Builder() .setName("LinkMobile Page") // TODO: Define a title for the content shown. // TODO: Make sure this auto-generated URL is correct. .setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]")) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); }
Example #24
Source File: DeviceServicesActivity.java From EFRConnect-android with Apache License 2.0 | 5 votes |
/** * ATTENTION: This was auto-generated to implement the App Indexing API. * See https://g.co/AppIndexing/AndroidStudio for more information. */ public Action getIndexApiAction() { Thing object = new Thing.Builder() .setName("DeviceServices Page") // TODO: Define a title for the content shown. // TODO: Make sure this auto-generated URL is correct. .setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]")) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .setActionStatus(Action.STATUS_TYPE_COMPLETED) .build(); }