FeaturesHow it worksPricingDocsBlog
Sign inGet started

Win back the shoppers who almost bought.

Get startedChat on WhatsApp

Product

  • Features
  • How it works
  • Pricing

Resources

  • Docs
  • Blog
  • Recovery guide

Company

  • Careers
  • Support

Legal

  • Privacy
  • Terms
  • Data Deletion

© 2026 Nerja AI · Customer Intent & Retention

support@nerja.ai·+880 1886-157091

Chat on WhatsApp
  • Nerja AI documentation
  • Quick start
  • How Nerja works
  • Install the Nerja Tag
  • Events the tag detects
  • Tag JavaScript API
  • Privacy & consent
  • Mobile SDK overview
  • Get the SDK
  • Android SDK
  • iOS SDK
  • Push notifications setup
  • Push templates
  • Deep links: app or website
  • Connect email (AutoSend, Resend, Amazon SES)
  • Connect SMS (Twilio, BulkSMSBD)
  • Connect WhatsApp (WAAPI, Meta, Twilio)
  • Connect push (Firebase)
  • Campaign types
  • Delivery, open and click tracking
  • Signed user ids
  • Permissions explained
  • API reference
  • Store integrations
  • Troubleshooting
  • FAQ

Mobile SDK

Android SDK

Install, initialise, identify, track, handle push and deep links on Android.

Install#

Add the nerja-sdk module (its only dependency is Firebase Messaging) and your app's google-services.json. The SDK's manifest is merged automatically.

settings.gradle / app build.gradle
include ':nerja-sdk'
dependencies { implementation project(':nerja-sdk') }

Initialise#

Java
// Application.onCreate()
Nerja.init(this, new NerjaConfig.Builder()
    .baseUrl("https://api.nerja.ai")
    .appKey("nak_pk_live_YOUR_KEY")
    .build());   // add .firebase(...) only if you have no google-services.json

The SDK sends app_open on a cold start and registers the push token by itself. Your appId defaults to the application id; override with .appId("com.shop.app") if your key allows a different one.

Identify and track#

java
// after login
Nerja.identify("user_42", userHashFromYourBackend /* or null */, traits);

// anywhere
Nerja.track("add_to_cart", Map.of("product_id", "sku-1", "price", 249));

// logout
Nerja.logout();

userHash is only needed when you enabled signed user ids. Compute it on your server; never put the secret in the app.

Push notifications#

  • Android 13+ needs the user's permission: call Nerja.requestNotificationPermission(activity) at a moment that makes sense (e.g. after the first order).
  • Pushes that arrive while the app is closed are shown by the system; the SDK reports the tap.
  • Pushes while the app is open are shown by the SDK with image and a button.

Deep links#

java
Nerja.setLinkHandler((ctx, link, data) -> {
  // link = myshop://product/42   (or the website URL when the push had no app link)
  startActivity(ProductActivity.intentFor(ctx, link));
  return true;                   // handled — otherwise the SDK falls back to the website
});

For singleTop activities also call Nerja.handleIntent(this, intent) from onNewIntent. More: Deep links.

Permissions#

See the full list with reasons in Permissions explained.

Prefer to talk it through? Book a 30-minute call with the Nerja team.

PreviousGet the SDKNext iOS SDK

Something unclear or missing? Email support@nerja.ai and we will improve this page.

on this page

  • Install
  • Initialise
  • Identify and track
  • Push notifications
  • Deep links
  • Permissions