diff --git a/app/src/main/java/ms/appcenter/sampleapp/android/MainActivity.java b/app/src/main/java/ms/appcenter/sampleapp/android/MainActivity.java index eb6fb533..510f0257 100644 --- a/app/src/main/java/ms/appcenter/sampleapp/android/MainActivity.java +++ b/app/src/main/java/ms/appcenter/sampleapp/android/MainActivity.java @@ -32,10 +32,12 @@ public class MainActivity extends AppCompatActivity { new PushActivity() }; - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_root); + + @Override +protected void onCreate(Bundle savedInstanceState) { + AppCenter.start(getApplication(), "df99f3f0-3f28-4e2c-b9ee-379290fa7f18", + Analytics.class, Crashes.class); + // Initialize SDK if (!BuildConfig.APPCENTER_APP_SECRET.equals("")) { @@ -98,4 +100,4 @@ public CharSequence getPageTitle(@IntRange(from = 0, to = 6) final int position) return views[position].getClass().getSimpleName().trim().replace("Activity", ""); } } -} \ No newline at end of file +}