Skip to content

Instantly share code, notes, and snippets.

@Egorand
Created July 17, 2016 12:01
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 Egorand/d8e144e1120e04b012f9641b734a2e1a to your computer and use it in GitHub Desktop.
Save Egorand/d8e144e1120e04b012f9641b734a2e1a to your computer and use it in GitHub Desktop.
android-testing-runtime-permissions-showing-long-rationale
...
if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_CONTACTS)) {
permissionDeniedRationaleView.setText(R.string.permission_denied_rationale_short);
} else {
permissionDeniedRationaleView.setText(R.string.permission_denied_rationale_long);
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment