All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.com.wisetrack.sdk.WiseTrackPreinstallReferrerReceiver.kt Maven / Gradle / Ivy

There is a newer version: 1.5.3
Show newest version
package com.wisetrack.sdk


import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.wisetrack.sdk.Constants.Companion.EXTRA_SYSTEM_INSTALLER_REFERRER

/**
@author hamed (@hamed-hsb)
 * @since 19th October 2021
 *
 * You have to add this broadcast to manifest file like this:
 *
 *  
 *      
 *       
 *      
 *  
 */

class WiseTrackPreinstallReferrerReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context?, intent: Intent?) {
        if (intent == null) {
            return
        }

        val referrer = intent.getStringExtra(EXTRA_SYSTEM_INSTALLER_REFERRER) ?: return

        WiseTrack.getDefaultInstance().sendPreinstallReferrer(referrer, context)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy