app/src/main/java/com/filipetrovic/auxilium/IntroActivity.java
/*
        Launcher activity used for requesting permissions.
        If permissions are granted, move onto MainActivity.
     */
Launcher activity used for requesting permissions.
If permissions are granted, move onto MainActivity.
Launcher activity used for requesting permissions . If permissions are granted move onto MainActivity .
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if(ContextCompat.checkSelfPermission(this,
                Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED) {
            openMainActivity();
        }
        setTheme(R.style.AppTheme);
        setContentView(R.layout.activity_intro);
        findViewById(R.id.intro_permission_button).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                requestPermissions();
            }
        });
    }
@ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; if ( ContextCompat . checkSelfPermission ( this , Manifest . permission . RECORD_AUDIO ) == PackageManager . PERMISSION_GRANTED ) { openMainActivity ( ) ; } setTheme ( R . style . AppTheme ) ; setContentView ( R . layout . activity_intro ) ; findViewById ( R . id . intro_permission_button ) . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { requestPermissions ( ) ; } } ) ; }
Launcher activity used for requesting permissions.
Launcher activity used for requesting permissions .
// If microphone permissions are granted, open MainActivity. // Set AppTheme to remove Splash Screen background.