blob: 3b8a7a01b0e156eb4b6f1cc97bde6ea5ed8b5b2c [file] [log] [blame]
package com.example.creation;
import android.app.Activity;
import com.google.firebase.appindexing.Action;
import com.google.firebase.appindexing.FirebaseUserActions;
import com.google.firebase.appindexing.builders.Actions;
public class MainActivity extends Activity {
/**
* ATTENTION: This was auto-generated to implement the App Indexing API.
* See https://g.co/AppIndexing/AndroidStudio for more information.
*/
public Action getIndexApiAction() {
return Actions.newView("Main", "http://www.example.com/main");
}
@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.
FirebaseUserActions.getInstance().start(getIndexApiAction());
}
@Override
public void onStop() {
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
FirebaseUserActions.getInstance().end(getIndexApiAction());
super.onStop();
}
}