Preview: the PushFleet API isn't live yet. Join the waitlist
Kotlin
The Kotlin SDK registers devices from your app with your publishable key. Sending happens from your server.
Install
Section titled “Install”Add the dependency to your app module’s build.gradle.kts:
implementation("com.pushfleet:pushfleet-android:0.1.0")Register
Section titled “Register”Configure PushFleet in your Application, then register from your FirebaseMessagingService.onNewToken and after sign-in.
PushFleet.configure(context, publishableKey = "pf_pub_test_…")
PushFleet.register(fcmToken = token, userId = "user_8f3k")Calling register on every launch is safe: the same token updates instead of duplicating.
Live mode
Section titled “Live mode”In live mode, pass a user token your server signed for the signed-in user. See identity verification.
PushFleet.register(fcmToken = token, userId = "user_8f3k", userToken = userToken)