B Bubbl Docs

Android Setup (Flutter)

This page covers Android app requirements for bubbl_flutter_sdk.

1) Ensure Maven Central is configured

tech.bubbl.sdk:bubbl-sdk is published to Maven Central, so no custom credentials are required.

2) Ensure Firebase Google Services plugin is applied

In android/app/build.gradle.kts:

plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("dev.flutter.flutter-gradle-plugin")
    id("com.google.gms.google-services")
}

3) Add google-services.json

Place Firebase config at:

  • android/app/google-services.json

The Firebase Android app package must match your applicationId.

4) Ensure Android SDK levels are compatible

bubbl_flutter_sdk requires:

  • minSdk 27+
  • Java/Kotlin toolchain compatible with Java 17

5) Add manifest permissions, services, and metadata

In android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<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.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />

<application>
  <service
      android:name="tech.bubbl.sdk.services.LocationUpdatesService"
      android:foregroundServiceType="location" />

  <service
      android:name="tech.bubbl.sdk.services.MyFirebaseMessagingService"
      android:exported="false">
      <intent-filter>
          <action android:name="com.google.firebase.MESSAGING_EVENT" />
      </intent-filter>
  </service>

  <meta-data
      android:name="com.google.firebase.messaging.default_notification_channel_id"
      android:value="bubbl_push" />

  <meta-data
      android:name="com.google.android.geo.API_KEY"
      android:value="${GOOGLE_MAPS_API_KEY}" />
</application>

6) Repository-mode note

If your app enforces strict dependencyResolutionManagement, ensure mavenCentral() is present:

dependencyResolutionManagement {
  repositories {
    google()
    mavenCentral()
  }
}

7) Validate

flutter run -d android

If boot fails with Firebase initialization errors, re-check google-services.json package name alignment.