AndroidManifest.xml: Ensure required native dependencies or permissions are added. For example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Foreground Location permission -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- Background Location permission, disabled by default -->
<!-- uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" -->
<!-- Bluetooth Beacon permissions, disabled by default -->
<!-- uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30"/ -->
<!-- uses-permission android:name="android.permission.BLUETOOTH_SCAN" -->
</manifest>
The above example includes the Foreground Location permission, the Background Location permission and the Bluetooth Scan permission:
- Foreground Location permission: enables foreground location capabilities for the app. Enabled by default.
- Background Location permission: enables background location capabilities for the app. Disabled by default.
- Bluetooth permission: enables detection of BLE Beacons on older Android devices. Disabled by default.
- Bluetooth Scan permission: enables detection of BLE Beacons on newer Android devices. Disabled by default.
Note: If your Flutter Android app is written in Kotlin, create an Application.kt
file and reference it in your -AndroidManifest.xml.