0

Just wondering for apps that have not yet implemented the request dialog or for older apps, what are the implications or side effects of keeping it not implemented ?

Thanks.

AlexVPerl
  • 7,652
  • 8
  • 51
  • 83

1 Answers1

0

If your targetSdkVersion is below 23, life will be more or less normal. The user will be prompted for permissions at install time. However, the user can still go into Settings and revoke those permissions. Affected APIs basically turn into "no-ops":

  • queries for contacts return empty cursors if the user revoked access to contacts
  • attempts to get a GPS fixes never gets a fix if the user revoked access to location
  • etc.

Most of the time, these are edge cases that you should already be handling (e.g., the device is in an underground parking garage and cannot get a GPS fix).

If your targetSdkVersion is 23 or higher, you fail everywhere with a SecurityException, for dangerous permissions, since you have not requested them at runtime from the user.

Moral of this story: only set your targetSdkVersion to 23 or higher when you are ready to take the time to handle runtime permissions.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491