LogoLogo
🚀 Run Maestro tests in the cloud →
  • Home
  • Star us on GitHub
  • Getting Started
    • What is Maestro?
    • Installing Maestro
      • macOS
      • Windows
      • Linux
    • Build and Install your App
      • Android
      • iOS
    • Run a Sample Flow
    • Writing Your First Flow
    • Maestro Studio
    • Running Flows on CI
  • Cloud
    • Run Maestro tests in the cloud
    • Cloud Quickstart
    • CI Integration
      • GitHub Actions
        • Maestro GitHub Action for Android
        • Maestro GitHub Action for iOS
        • Maestro GitHub Action for Flutter
      • Bitrise
      • Bitbucket Pipelines
      • CircleCI
      • Integration with any CI platform
    • Pull Request Integration
    • Cloud Reference
      • Build your app for the cloud
      • Configuring OS Version
      • Configuring device locale
      • Device timezones
      • Email Notifications
      • Slack Notifications
      • Webhook Integration
      • Managing Secrets
      • Limits
      • Reusing App Binary
      • IP Allowlist
      • System Status
  • Platform Support
    • Supported Platforms
    • Android - Views
    • Android - Jetpack Compose
    • iOS - UIKit
    • iOS - SwiftUI
    • React Native
    • Flutter
    • Web Views
    • Web (Desktop Browser)
  • Examples
    • Android contacts flow automation
    • Facebook signup flow automation
    • Advanced: Wikipedia Android
    • Page Object Model
  • CLI
    • Cloud
    • Test Suites & Reports
    • Tags
    • Record Your Flow
    • Continuous Mode
    • View Hierarchy
    • Start Device
  • API Reference
    • Commands
      • addMedia
      • assertVisible
      • assertNotVisible
      • assertTrue
      • assertWithAI
      • assertNoDefectsWithAi
      • back
      • clearKeychain
      • clearState
      • copyTextFrom
      • evalScript
      • eraseText
      • extendedWaitUntil
      • extractTextWithAI
      • hideKeyboard
      • inputText
      • killApp
      • launchApp
      • openLink
      • pressKey
      • pasteText
      • repeat
      • retry
      • runFlow
      • runScript
      • scroll
      • scrollUntilVisible
      • setAirplaneMode
      • setLocation
      • startRecording
      • stopApp
      • stopRecording
      • swipe
      • takeScreenshot
      • toggleAirplaneMode
      • tapOn
      • doubleTapOn
      • longPressOn
      • travel
      • waitForAnimationToEnd
    • Common command arguments
    • Selectors
    • Configuration
      • Workspace configuration
      • Flow configuration
      • AI configuration
  • Advanced
    • Nested Flows
    • Wait
    • Loops
    • Conditions
    • Parameters & Constants
    • JavaScript
      • Run JavaScript
      • Outputs
      • Logging
      • Access element text
      • Make HTTP requests
      • GraalJS support
      • JavaScript announcement blog
    • Specify a Device
    • Configure Permissions
    • Detect Maestro in your app
    • Configure Maestro driver timeout
    • onFlowStart / onFlowComplete hooks
    • Test in different locales
    • Structuring your test suite
  • Troubleshooting
    • Known Issues
    • Frequently Asked Questions
    • Bug Report
    • Rollback Maestro
    • Debug Output
    • HOWTOs
      • Arrange your repository for Maestro tests
      • scrollUntilVisible for fragments
  • Community
    • Contributions
    • Articles & Tutorials
    • Case Studies
    • Resources
Powered by GitBook

Read to wire into CI or scale up your testing?

  • Run Maestro tests in the cloud →
On this page
  • Available permissions
  • Supporting permission IDs for Android
  • Available permission names
  • Examples
  • Deny all permissions
  • Deny all permissions but allow the medialibrary permission
  • Deny all permissions but allow adding voicemails

Was this helpful?

Edit on GitHub
  1. Advanced

Configure Permissions

By default, all permissions are set to allow by the launchApp command. It is possible to launch an app with custom permissions behaviour by passing the permissions argument to launchApp:

- launchApp:
    permissions:
      all: deny
      camera: allow
      location: allow

Available permissions

Maestro has standardized names for most permissions.

For example, on Android: bluetooth targets both android.permission.BLUETOOTH_CONNECT and android.permission.BLUETOOTH_SCAN.

Permission
iOS support
Android support

calendar

✅

✅

camera

✅

✅

contacts

✅

✅

health

❌

❌

homekit

✅

❌

location

✅

✅

medialibrary

✅

✅

microphone

✅

✅

motion

✅

❌

notifications

✅

✅

photos

✅

❌

reminders

✅

❌

siri

✅

❌

speech

✅

❌

usertracking

✅

❌

bluetooth

❌

✅

phone

❌

✅

storage

❌

✅

sms

❌

✅

my.custom.permission

❌

✅

Use all as a permission name to represent all the permissions that the app can ask for.

Supporting permission IDs for Android

There are permissions on Android that are not listed in the table above. Use the permission IDs in place of the permission name to set these permissions.

For example, to allow the "add voicemail" permission, use:

- launchApp:
    permissions:
        com.android.voicemail.permission.ADD_VOICEMAIL: allow

Available permission names

Every permission can be set to: allow, deny or unset

Permission Value
iOS
Android

allow

Permission granted

Permission granted

deny

Permission denied

Permission will be asked during flow run

unset

Permission will be asked during flow run

Permission will be asked during flow run

Some iOS permissions can have other values:

Permission
Value
Description

location

always

Same as allow

inuse

Only allow location whilst using the app

never

Same as deny

photos

limited

Allow limited access to photos

Examples

Permissions are set by passing them to the launchApp command as follows:

Deny all permissions

- launchApp:
    permissions: { all: deny } 

Deny all permissions but allow the medialibrary permission

- launchApp:
    permissions:
        all: deny
        medialibrary: allow

Deny all permissions but allow adding voicemails

- launchApp:
    permissions:
        all: deny
        com.android.voicemail.permission.ADD_VOICEMAIL: allow
PreviousSpecify a DeviceNextDetect Maestro in your app

Last updated 8 months ago

Was this helpful?