Mobile Development Kit Android App Permissions¶
A Mobile Development Kit Android app requests several permissions by default. Some are required by the underlying SAP BTP SDK for Android and are declared in several library manifests, like cloud_mobile_foundation/src/main/AndroidManifest.xml
. Some are required by Mobile Development Kit itself and are declared the in main manifest src/main/AndroidManifest.xml
. For instance,
android.permission.CAMERA
: This permission is required for the following use cases: (We recommend not disabling it)- Scan QR codes during onboarding
- Scan barcodes using barcode scan action, search bars, and simple property barcode scan input
- Take a picture and attach within the application
android.permission.ACCESS_COARSE_LOCATION
- This permission is for the SDK Map and Usage features and is not currently exposed in out-of-the-box Mobile Development Kit controls/features
- If your app does not try to get the current location nor use the SDK Map or Usage, then it could potentially be disabled
android.permission.READ_EXTERNAL_STORAGE
This permission is required for the following use cases:- Selecting files or images for attaching within the app
- Reading offline OData stores
You can disable this permission if your app does not offer file attachment and offline data access features.
To disable a default permission, create a partial manifest
App_Resources_Merge/Android/src/main/AndroidManifest.xml
in your.mdkproject
as shown below. Refer Android manage manifest files documentation for more details.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=http://schemas.android.com/apk/res/android xmlns:tools=http://schemas.android.com/tools>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
</manifest>
Note
Disabling a necessary app permission can break your app's functionality.
Last update: April 6, 2023