protected void onCreate()

in app/src/main/java/ms/appcenter/sampleapp/android/MainActivity.java [36:61]


    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_root);

        // Initialize SDK
        if (!BuildConfig.APPCENTER_APP_SECRET.equals("")) {
            // Use APPCENTER_APP_SECRET environment variable if it exists
            AppCenter.start(getApplication(), BuildConfig.APPCENTER_APP_SECRET,
                    Analytics.class, Crashes.class, Distribute.class);
        } else {
            // Otherwise use the hardcoded string value here
            AppCenter.start(getApplication(), "<APP SECRET HERE>",
                    Analytics.class, Crashes.class, Distribute.class);
        }


        if (BuildConfig.DEBUG) {
            AppCenter.setLogLevel(Log.VERBOSE);
        }

        // UI Elements
        mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());

        mViewPager = findViewById(R.id.container);
        mViewPager.setAdapter(mSectionsPagerAdapter);
    }