Skip to content

Instantly share code, notes, and snippets.

@spidergears
Last active July 14, 2016 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spidergears/35d7fa5848fd80333d8bf7da2bc03917 to your computer and use it in GitHub Desktop.
Save spidergears/35d7fa5848fd80333d8bf7da2bc03917 to your computer and use it in GitHub Desktop.
checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)
=> ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE);
requestPermissions(new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_REQUEST_CODE);
=> ActivityCompat.requestPermissions(MainActivity.this, new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_REQUEST_CODE);
shouldShowRequestPermissionRationale(Manifest.permission.WRITE_EXTERNAL_STORAGE)
=> ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment