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.
App with target SDK max. 22 installed on an M device and all permissions granted -> update app with new permission model
App with target SDK max. 22 installed on an M device and all permissions denied -> update app with new permission model
install app with target SDK 23 on a M device
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)
App with target SDK 23 and read_contacts granted -> add another permission from contacts group (write_contacts)
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.
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
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
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
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
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)