AndroidManifest.xml and can be configured using config plugins.
What are Android permissions?
Android uses a permission system to protect user privacy and security. Apps must declare permissions they need in the manifest, and users grant them at install time (for normal permissions) or runtime (for dangerous permissions).Permission types
Normal permissions - Granted automatically at install:- Internet access
- Vibration
- Set alarm
- Access network state
- Camera
- Microphone
- Location
- Contacts
- Storage
- Phone
- SMS
- Calendar
Adding permissions with plugins
Basic permission addition
UsewithPermissions or modify the manifest directly:
Using AndroidConfig helpers
The recommended approach usesAndroidConfig utilities:
Permissions.ts
Manual manifest modification
Permissions.ts
Permission shorthand
Permissions can be specified with or without the full package:Permissions.ts
Common permissions
Camera
Location
Microphone
Storage
Contacts
Phone
Calendar
Notifications (Android 13+)
Blocking permissions
Prevent third-party libraries from adding unwanted permissions:Permissions.ts
Permissions.ts
Runtime permissions
Some permissions require runtime requests. While the manifest declares them, your JavaScript code must request them:Permission features and hardware
Adding features
Declare hardware features your app uses:android.hardware.camera- Cameraandroid.hardware.camera.autofocus- Camera autofocusandroid.hardware.location- Locationandroid.hardware.location.gps- GPSandroid.hardware.microphone- Microphoneandroid.hardware.telephony- Phoneandroid.hardware.touchscreen- Touchscreenandroid.hardware.bluetooth- Bluetoothandroid.hardware.nfc- NFC
Max SDK version for permissions
Limit permissions to specific Android versions:Using Expo config for permissions
Expo’sandroid.permissions field automatically adds permissions:
app.json
withPermissions plugin internally:
Permissions.ts
Blocking permissions from config
app.json
Permissions.ts
Helper functions from source
Checking if permission exists
Permissions.ts
Adding permission to manifest
Permissions.ts
Getting all permissions
Permissions.ts
Removing permissions
Permissions.ts
Complete example plugin
Testing permission plugins
Best practices
1. Request minimum necessary permissions
Only request permissions your app actually needs.2. Use permission helpers
LeverageAndroidConfig.Permissions utilities instead of manual manipulation.
3. Block unnecessary permissions
UseblockedPermissions to remove permissions added by third-party libraries.
4. Consider Android version differences
Some permissions changed in Android 11, 12, and 13. UsemaxSdkVersion when appropriate.
5. Combine with runtime permission requests
Manifest permissions are necessary but not sufficient. Always request dangerous permissions at runtime.Next steps
- iOS Entitlements - iOS equivalent
- Modifying native projects - More Android modifications
- Plugin API reference - Complete API docs