Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android M permission install/update behavior

With Android Marshmallow there is a new permission model. Implementing the new model was not a big deal for my affected app permissions. But there were some question around the install and update behavior. I identified some scenarios which are important for me. I know the official documentation (https://developer.android.com/preview/features/runtime-permissions.html) and some things might be clear, but I wanted to be sure.

  1. App with target SDK max. 22 installed on an M device and all permissions granted -> update app with new permission model

  2. App with target SDK max. 22 installed on an M device and all permissions denied -> update app with new permission model

  3. install app with target SDK 23 on a M device

  4. App with target SDK 22 or 23 and all permissions granted -> add new permission of an already granted group permission (read_storage) and new permission of another group (read_contacts)

  5. App with target SDK 23 and read_contacts granted -> add another permission from contacts group (write_contacts)

like image 527
Thomas R. Avatar asked Sep 04 '15 07:09

Thomas R.


1 Answers

Using the developer console and beta testing with Android I tested my own scenarios. This is my outcome. Most of them matched my expectations but I want to summarize it either. Maybe this helps one of you having the same questions and just want to know if it behaves like expected. It is not claimed that this is complete.

  1. App with target SDK max. 22 installed on an M device and all permissions granted -> update app with new permission model

    • after app update with target SDK 23 permissions are still granted
  2. App with target SDK max. 22 installed on an M device and all permissions denied -> update app with new permission model

    • after app update with target SDK 23 permissions are still denied
  3. install app with target SDK 23 on a M device

    • installs without any user interaction or notification
    • all permissions are denied after install, need to be granted -> permission dialogs appear like implemented
  4. App with target SDK 22 or 23 and all permissions granted -> add new permission of an already granted group permission (read_storage) and new permission of another group (read_contacts)

    • having write_storage automatically grants read_storage (developer console already added this in the permissions info for the APK)
    • read_contacts only requests read_contacts (developer console only displays this particular permission for the APK)
    • formerly granted permissions are ok, read_contacts needs to be granted
  5. App with target SDK 23 and read_contacts granted -> add another permission from contacts group (write_contacts)

    • no special handling, permission can be used without any further user interaction
    • on older devices (target max 22) the user is not notified about new permission as he already grants the group permission
    • when adding write_contacts in developer console the permission is visible but not marked as new (in permission info of APK)
like image 54
Thomas R. Avatar answered Sep 21 '22 13:09

Thomas R.