# Manifest and Permissions This is where the SDK connects to the Android OS. ## Step 1: Add required permissions File: `app/src/main/AndroidManifest.xml` ```xml ``` ## Why each permission exists - `ACCESS_FINE_LOCATION` and `ACCESS_COARSE_LOCATION`: Bubbl uses location to refresh campaigns and geofences. - `POST_NOTIFICATIONS`: required on Android 13+ to display push notifications. - `FOREGROUND_SERVICE` + `FOREGROUND_SERVICE_LOCATION`: required for continuous location updates. - `INTERNET`: required for API calls and content delivery. - `VIBRATE`: used by notification effects. ## Optional permissions used in the host app ```xml ``` Background Location `ACCESS_BACKGROUND_LOCATION` is only required if your app needs location tracking while in the background. Storage permissions are only used for log sharing. ## Step 2: Register Bubbl services and FCM handler ```xml ``` ## Why Android will not launch services that are not declared in the manifest. ## Step 3: Default notification channel ```xml ``` ## Why This ensures notifications are grouped into a known channel if your app does not create one. ## Step 4: Map API key (only if you use maps) ```xml ``` ## Why Required for Google Maps MapView. ## Step 5: FileProvider (only if you share logs) ```xml ``` FileProvider Requirement This requires a `res/xml/file_paths.xml` file. The host app references it but does not include it, so log sharing would crash unless you add the file.