Skip to content

Instantly share code, notes, and snippets.

@BalioFVFX
Created May 12, 2019 12:26
Show Gist options
  • Save BalioFVFX/530c3d2d41edeec7419a796ee804d180 to your computer and use it in GitHub Desktop.
Save BalioFVFX/530c3d2d41edeec7419a796ee804d180 to your computer and use it in GitHub Desktop.
private void checkForPermissions(){
if(ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED){
ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, 2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment