Permissions Overview
Learn how to manage device permissions in your app, including camera, location, and contacts
Mobile app permissions play a critical role in ensuring secure interaction between users and applications. They serve as a framework that enables apps to access specific features or data on a user's device, such as the camera, microphone, location, or contact list, and allow the user to retain complete control over their privacy and data security.
By granting these permissions, users allow apps to deliver tailored functionalities and enhance their overall experience. Some Native Plugins may require certain device permissions to fulfill their use case.
Apple and Google encourage developers to request permission thoughtfully. If a user has declined, you can suggest they enable the permission through the app's settings menu and include a button that launches the app settings screen using the JavaScript Bridge.
Developer DemoDisplay our demo page in your app to test during development permissions demo page
Related Documentation
Permission Prompt Localization
Localize iOS usage descriptions and customize how permission prompts are presented to users in their language.
Apple App Tracking Transparency
Implement ATT for iOS 14.5+ and request user consent for tracking. Required for attribution and some analytics.
Background Audio
Enable audio playback to continue when the app is in the background. Configure background audio capability and usage.
Camera and File Uploads
Configure camera capture and file upload permissions. Control how users select or capture images and files from the device.
Downloads Directory
Configure where downloaded files are stored and how the app accesses the downloads directory.
Location Services
Request and use location permissions for when-in-use or always-on location access. Configure location-related features.
WebRTC Audio & Video
Enable microphone and camera access for WebRTC-based features such as voice and video calling.
Permission Prompts
When requesting permissions from your users, they will be asked to provide their consent. Those prompts are native app components with very limited customization.
- iOS: iOS allows a customizable usage description for permission prompts, enabling developers to explain how the requested data will be used. You can follow Permission Prompt Localization to localize the usage description.
- Android: Android permission prompts are served from the system and are translated to the device language. No additional customization is supported.
JavaScript Bridge Functions
Permissions Status
Users can change the permissions granted to your app through their device settings. You can programmatically check the status of permissions using the Median JavaScript Bridge:
// get status of all permissions
const response = await median.permissions.status();
// only get status of selected permissions
const response = await median.permissions.status(["Contacts", "Camera"]);The response object includes the current state for each requested permission:
{
"Contacts": "undetermined",
"Camera": "granted"
}Each permission can have the following states:
- denied: The permission has been denied or revoked; it can be asked for again.
- granted: The permission has been granted.
- undetermined: The permission was never asked (iOS only).
Status can be fetched for the following permission types:
PhotoLibrary(iOS only)AppTrackingTransparency(iOS only)LocationAlwaysLocationWhenInUseMicrophoneContactsCameraNotifications
App Settings
Developer DemoTest launching the app settings menu: median.dev/app-settings
When users have denied permissions, you can direct them to the app's settings page to enable the required permissions:
median.open.appSettings();To open the Settings page for your app, use the URL above or the JavaScript Bridge call.
You can also review app permissions on device following the official guides:
- iOS: Control access to information in apps on iPhone
- Android: Change app permissions on your Android phone
Frequently Asked Questions
Can I request Bluetooth Access?
Can I request Bluetooth Access?
As of now Bluetooth is an experimental feature not supported by iOS WebKit or Android WebView.
You can track compatibility here: MDN - Web Bluetooth API
We support a range of Bluetooth devices such as payment terminals, printers, sensor devices, etc through vendor provided SDKs and custom native plugins that implement the iOS Core Bluetooth and Android Bluetooth functionality.
We implemented custom Bluetooth integrations in our iBeacon and Master Lock plugins.
Updated 4 days ago