Mobile SDK
Get the SDK
Download the Android and iOS SDK, add it to your app and start sending push notifications through your own Firebase project.
The Nerja SDK is a small library you add to your own mobile app. With it, push notifications use your Firebase project and your users' devices register themselves with Nerja automatically.
How you get it
Download#
| Platform | Package | Needs |
|---|---|---|
| Android (Java, API 23+) | nerja-android-sdk-1.0.0.zip | Firebase Cloud Messaging |
| iOS (Swift package, iOS 13+) | nerja-ios-sdk-1.0.0.zip | FirebaseMessaging + APNs key |
1. Give it your Firebase file#
In the Firebase console open Project settings → Your apps and download google-services.json (Android) or GoogleService-Info.plist (iOS). This file only identifies your app; it is not the service-account key you paste into Nerja.
2. Android in five minutes#
- 1
Add the module
Unzip, copy the
nerja-sdkfolder next to yourappfolder, then:settings.gradle / app/build.gradleinclude ':nerja-sdk' dependencies { implementation project(':nerja-sdk') } - 2
Initialise it
Application.onCreate()Nerja.init(this, new NerjaConfig.Builder() .baseUrl("https://api.nerja.ai") .appKey("nak_pk_live_…") // from AI Connectors → Firebase → your app .build());If you already use the
google-servicesGradle plugin nothing else is needed. Without the plugin, put the JSON inres/rawand pass it with.firebaseJson(json, getPackageName()). - 3
Ask for notification permission (Android 13+)
javaNerja.requestNotificationPermission(activity);
3. iOS in five minutes#
- 1
Add the package
Xcode → File → Add Package Dependencies → Add Local… and choose the unzipped folder. Add Firebase's
FirebaseMessagingpackage and yourGoogleService-Info.plist. - 2
Enable capabilities
Turn on Push Notifications and Background Modes → Remote notifications. This needs a paid Apple Developer account.
- 3
Configure
swiftNerja.shared.configure(baseURL: "https://api.nerja.ai", appKey: "nak_pk_live_…") // after Firebase gives you the FCM token: Nerja.shared.registerPushToken(token)
4. Connect the Firebase project in Nerja#
Open AI Connectors → Firebase, paste your service-account JSON and create the app. The dialog shows the app key to use above. See Push setup for the full flow.
5. Check it works#
- Run the app and accept the notification prompt.
- In Nerja open a recipient — the FCM token appears on their profile within a few seconds.
- Send a push campaign to that audience and look for the delivered and opened counters.
Keep your keys apart
nak_pk_live_ app key is public and safe in the app. The Firebase service-account JSON is a secret — paste it only into Nerja, never into the app or a repository.Prefer to talk it through? Book a 30-minute call with the Nerja team.
Something unclear or missing? Email support@nerja.ai and we will improve this page.