Skip to main content
The Android SDK can render in-app notifications natively (banner, alert, HTML) and unwrap Spotzee click-tracking URLs so taps in emails open the right screen in your app. Both surfaces flow through delegates and standard Android intent handling.

In-app notifications

In-app notifications are content campaigns or journey steps that target the user’s open app session, not the OS notification tray. The SDK fetches them, asks your delegate what to do, and renders chosen ones in a DialogFragment.

Wire up the delegate

Implement InAppDelegate and pass an instance into Spotzee.initialize:
Default implementations cover everything except handle. Only override what you need to change.

What each delegate hook does

Auto-show on Activity resume

The SDK observes ProcessLifecycleOwner and fires showLatestNotification the first time an AppCompatActivity resumes after init (when autoShow = true). You don’t need to wire this yourself. For finer control, set autoShow = false and call analytics.showLatestNotification() from your own UI moment (after sign-in, after the home screen renders) to defer in-app delivery to a calmer surface than launch.
To enumerate or render a specific notification yourself:
To mark a notification read without showing it:
To dismiss a currently shown notification programmatically:

The three content types

For ALERT and HTML, the embedded HTML can call window.trigger({ … }) from JavaScript to invoke your delegate’s handle(action = InAppAction.CUSTOM, context, notification) with the passed payload. Use this for “Buy now” buttons, “Open settings” actions, or anything that needs to bridge the WebView back to native code. Spotzee click-tracks email links by wrapping them in a https://<your-tracking-domain>/c?r=<encoded-target-url> URL. The SDK’s getUriRedirect(uri) unwraps the wrapper, registers the click with Spotzee, and returns the unwrapped target URI. Add an intent-filter to the Activity that should receive Spotzee deeplinks. Use android:autoVerify="true" for App Links so the OS hands the URL straight to your app instead of the browser.
For App Links to verify, the assetlinks.json for your domain must be served from https://<host>/.well-known/assetlinks.json and list your app’s package name and SHA-256 fingerprint. Read Android’s Verify Android App Links guide.

Unwrap on intent delivery

Override onNewIntent (or read the intent from onCreate) and pass the URI through analytics.getUriRedirect(uri). The method returns the unwrapped target URI when it recognised the link, or null when it didn’t.
getUriRedirect also fires the click-registration call to Spotzee in the background so analytics on your campaigns stay accurate.

One-shot navigation helper

If you want the SDK to both register the click AND open the unwrapped URL on your behalf, use handle(uri) instead of getUriRedirect(uri). It returns true when it handled the URL, false when the URL wasn’t a Spotzee tracking link.
handle(uri) opens the redirect via Intent.ACTION_VIEW with FLAG_ACTIVITY_NEW_TASK. Use getUriRedirect instead if you need full control over how the destination opens.

Next steps

Set up push providers

FCM credentials must be configured before pushes deliver.

Configure custom domains

Set up a custom tracking domain to use as your App Links host.