Skip to content

Platform setup

Beekon declares the permissions it needs in its own manifest/Info.plist and merges them into your app at build time — but you still request the dangerous permissions at runtime and provide the OS-level declarations. Pick your platform; the tabs stay synced.

The install + first-fix flow is on the Quickstart; this page is the OS plumbing.

The .aar declares its permissions in its own manifest; they merge into your app at build. You request them at runtime and provide a NotificationConfig for the foreground service.

app/build.gradle.kts
android {
defaultConfig {
minSdk = 26 // Beekon's minimum
}
}
dependencies {
implementation("io.github.beekonlabs:beekon:0.1.1")
}

JDK 17 to build. explicitApi() is enforced — Kotlin 2.x is recommended but your app’s version needn’t match.

Add these to app/src/main/AndroidManifest.xml if you want to see them in your merged manifest:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

FOREGROUND_SERVICE_LOCATION is required from Android 14 (API 34). POST_NOTIFICATIONS is required from Android 13 (API 33) for the foreground-service notification to be visible.

Android forces a three-step sequence — you can’t ask for background location without first having foreground location, and notifications need their own grant on Android 13+.

  1. Request ACCESS_FINE_LOCATION + ACCESS_COARSE_LOCATION together (single dialog).
  2. On API 29+, request ACCESS_BACKGROUND_LOCATION separately. This always opens Settings on API 30+.
  3. On API 33+, request POST_NOTIFICATIONS.

The Compose sample at beekon-android/sample ships a LocationPermissions composable that walks through this exact sequence — copy from there if you don’t have a permissions helper.

BeekonConfig.notification is required — Android shows a notification while location is captured in the background. Its three fields are documented on Configuration. The channel id and notification id are SDK-internal constants.