| package com.example.creation; |
| |
| import a.Action; |
| |
| import android.app.Activity; |
| import com.google.firebase.appindexing.FirebaseUserActions; |
| import com.google.firebase.appindexing.builders.Actions; |
| |
| public class MainActivity extends Activity { |
| |
| |
| public Action getIndexApiAction() { |
| return new Action(); |
| } |
| |
| /** |
| * ATTENTION: This was auto-generated to implement the App Indexing API. |
| * See https://g.co/AppIndexing/AndroidStudio for more information. |
| */ |
| public com.google.firebase.appindexing.Action getIndexApiAction0() { |
| 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(getIndexApiAction0()); |
| } |
| |
| @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(getIndexApiAction0()); |
| super.onStop(); |
| } |
| } |