Skip to main content

Grant

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Grant an app's permissions up front, so a first-launch permission dialog never appears to block the flow. These call app_grant.

Grant​

public void Grant(string app, params string[] permissions)

Grants permissions up front, so no dialog blocks the flow. Names are cross-platform ("camera", "location", …); "all" grants everything the app declares. On Android the result is verified by reading the state back, because pm grant reports success for permissions the app never declared.

Examples​

Grant two permissions before a flow​

device.Grant("com.example.shop", "camera", "location");