Notix InApp SDK

NOTIX is an audience re-engagement service based on push notifications that work for both desktop and mobile devices.

Contents

Setup

1. Add SDK dependency

Add the sdk dependency to your module’s build.gradle file, in the dependencies block

implementation 'co.notix:android-sdk:+'  

2. Extend the Application class

2.1. Create a new file App.kt and extend Application

class App : Application() {
    override fun onCreate() {   
        super.onCreate()
        /* ... */ 
    }
}   

2.2. Register the newly created App class in your AndroidManifest.xml.

<manifest ...>
    <application
        ...
        android:name=".App"> 
        ... 
    </application>
</manifest>  

Push notifications setup

Call NotixPush.init() from Application.onCreate() using your notixAppId and notixToken. These credentials can be found on the page of your In-App Android source

NotixPush.init(
    context = this,  
    notixAppId = /* your notixAppId */ 
    notixToken = /* your notixToken */
) 

Run the app and send your first notification!

Interstitial setup

Call NotixInterstitial.init and create a loader that will be accessible throughout your app:

class App : Application() {  
    override fun onCreate() {  
        super.onCreate()
        /* ... */
        NotixInterstitial.init(notixToken = /* your notixToken */)  
        loader.startLoading() 
    }  
  
    companion object {  
        val interstitialLoader = NotixInterstitial.createLoader(zoneId = /* your Zone ID */)    
    }  
}

At the show site get Interstitial instance from the loader and pass it to NotixInterstitial.show:

App.interstitialLoader.doOnNextAvailable { result -> 
    if (result is InterstitialLoader.Result.Data) {
        NotixInterstitial.show(  
            context = this,  
            interstitial = result.interstitial
        )
    }
}

You do not need to manage the loader yourself. It does its best effort to load and cache exactly 3 entries.

Further steps

For additional settings please visit this page