title: Android 6.0 Settings Permission befor Splash Screen
body: <p>Hi i have app that work fine from API 18 to API 22.
  For new Android API 23 i'm trying to set a check permission that i have set on Manifest. I'm using Dexter library. Now i would like that the dialog settings for enable permission are show before my splash screen and when i click "ok" on dialog permission the app remain open and show my intro view and after the main view.
  I have set this code that work during splash screen run and when i set ok for enable permission app are close instead remain open.
  This is my code for splash screen and dexter library:</p>
  
  <pre><code>public class SplashScreen extends Activity {
  
  
  //Set waktu lama splashscreen
  private static int splashInterval = 3000;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      Fabric.with(this, new Answers());
      Dexter.initialize(getApplicationContext());
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
              WindowManager.LayoutParams.FLAG_FULLSCREEN);
      setContentView(R.layout.splash_fragment);
  
  
  
  
  
  
  
  
  
      new Handler().postDelayed(new Runnable() {
  
  
          @Override
          public void run() {
              View v = findViewById(android.R.id.content);
  
              if (ActivityCompat.checkSelfPermission(getApplicationContext(),
                      android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager
                      .PERMISSION_GRANTED &amp;&amp; ActivityCompat
                      .checkSelfPermission(getApplicationContext(),
                              android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager
                      .PERMISSION_GRANTED) {
  
                  MultiplePermissionsListener snackbarMultiplePermissionsListener =
                          SnackbarOnAnyDeniedMultiplePermissionsListener.Builder
                                  .with((ViewGroup) v.getRootView(),"")
                                  .withOpenSettingsButton("Settings")
                                  .withCallback(new Snackbar.Callback() {
                                      @Override
                                      public void onShown(Snackbar snackbar) {
                                          // Event handler for when the given Snackbar has been dismissed
                                      }
                                      @Override
                                      public void onDismissed(Snackbar snackbar, int event) {
                                          // Event handler for when the given Snackbar is visible
                                      }
                                  })
                                  .build();
                  Dexter.checkPermissions(snackbarMultiplePermissionsListener, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.GET_ACCOUNTS);
                  return;
  
  
              }
  
              Intent i = new Intent(SplashScreen.this, MainActivity.class);
              startActivity(i);
  
  
              //jeda selesai Splashscreen
              this.finish();
          }
  
          private void finish() {
              // TODO Auto-generated method stub
  
          }
      }, splashInterval);
  
  };
  </code></pre>
  
  <p>}</p>
  
  <p>How i can show this dialog settings before splash screen and remain app open after click ok to enable permission?</p>
  
  <p>Thanks</p>