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 aDialogFragment.
Wire up the delegate
ImplementInAppDelegate and pass an instance into Spotzee.initialize:
handle. Only override what you need to change.
What each delegate hook does
Auto-show on Activity resume
The SDK observesProcessLifecycleOwner 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.
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.
Deeplinks and App Links
Spotzee click-tracks email links by wrapping them in ahttps://<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.
Configure App Links in your manifest
Add anintent-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
OverrideonNewIntent (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, usehandle(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.