Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 3.39 KB

configuring-permissions.md

File metadata and controls

73 lines (53 loc) · 3.39 KB

Configuring Permissions

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.

Permission Values

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

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.

Supporting permission IDs for Android

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.

Examples

You can mention the names and values of the permissions with launchApp command as follows:

To deny all the permissions

- launchApp:
    permissions: { all: deny } 

To deny all the permissions but allow medialibrary

- launchApp:
    permissions: { all: deny, medialibrary: allow } 

To deny all the permissions but allow adding voicemail

- launchApp:
    permissions: { all: deny, com.android.voicemail.permission.ADD_VOICEMAIL: allow }