It is possible to launch an app with customized permissions behavior with maestro and change the default behavior of all permissions being granted.
You can provide permission names along with permission values to change the permission state.
Permissions values can be either of the three states: allow
, deny
or unset.
Permission Value | iOS | Android |
---|---|---|
allow | Permission granted | Permission granted |
deny | Permission denied | Permission denied |
unset | Permission will be asked during the flow run when needed | Permission denied |
Permission names represent all the set of permissions that can be configured on a platform. For example: bluetooth
on android supports both: android.permission.BLUETOOTH_CONNECT
and android.permission.BLUETOOTH_SCAN
permissions.
Permission Names | iOS | Android |
---|---|---|
calendar | ✅ | ✅ |
camera | ✅ | ✅ |
contacts | ✅ | ✅ |
health | ✅ | ❌ |
homekit | ✅ | ❌ |
location | ✅ | ✅ |
medialibrary | ✅ | ✅ |
microphone | ✅ | ✅ |
motion | ✅ | ❌ |
notifications | ✅ | ✅ |
photos | ✅ | ❌ |
reminders | ✅ | ❌ |
siri | ✅ | ❌ |
speech | ✅ | ❌ |
usertracking | ✅ | ❌ |
bluetooth | ❌ | ✅ |
phone | ❌ | ✅ |
storage | ❌ | ✅ |
Note: You can also use all
to represent all the set of permissions that the app can ask for.
There are a lot of permissions supported on Android and you might not find a few in the table above. Hence, we support permissions by directly using their IDs. For example, permission to add voice mail in the system can also be done by using the following:
com.android.voicemail.permission.ADD_VOICEMAIL
.
You can mention the names and values of the permissions with launchApp
command as follows:
- launchApp:
permissions: { all: deny }
- launchApp:
permissions: { all: deny, medialibrary: allow }
- launchApp:
permissions: { all: deny, com.android.voicemail.permission.ADD_VOICEMAIL: allow }