Untitled
unknown
plain_text
a year ago
2.5 kB
6
Indexable
package com.example.testflutter import android.R import android.app.Application import com.netcore.android.Smartech import com.netcore.android.smartechpush.SmartPush import com.netcore.android.smartechpush.notification.SMTNotificationOptions import com.netcore.smartech_appinbox.SmartechAppinboxPlugin import com.netcore.smartech_base.SmartechBasePlugin import com.netcore.smartech_push.SmartechPushPlugin import io.hansel.core.logger.HSLLogLevel import java.lang.String import java.lang.ref.WeakReference import kotlin.Any import kotlin.Exception class MainApplcation:Application() { override fun onCreate() { super.onCreate() Smartech.getInstance(WeakReference(applicationContext)).initializeSdk(this) Smartech.getInstance(WeakReference(applicationContext)).trackAppInstallUpdateBySmartech() Smartech.getInstance(WeakReference(applicationContext)).setDebugLevel(9) val smartech = Smartech.getInstance(WeakReference(this)) smartech.initializeSdk(this) smartech.trackAppInstallUpdateBySmartech() smartech.setDebugLevel(9) SmartechBasePlugin.initializePlugin(this) SmartechPushPlugin.initializePlugin(this) SmartechAppinboxPlugin.initializePlugin(this) try { val smartPush = SmartPush.getInstance(WeakReference(this)) smartPush.fetchAlreadyGeneratedTokenFromFCM() } catch (e: Exception) { } // enabling logs for nudges product HSLLogLevel.all.isEnabled = true HSLLogLevel.mid.isEnabled = true HSLLogLevel.debug.isEnabled = true val options = SMTNotificationOptions(this) options.brandLogo = String.valueOf(R.mipmap.sym_def_app_icon) //e.g.logo is sample name for brand logo options.largeIcon = String.valueOf(R.mipmap.sym_def_app_icon) //e.g.ic_notification is sample name for large icon options.smallIcon = String.valueOf(R.mipmap.sym_def_app_icon) //e.g.ic_action_play is sample name for icon options.smallIconTransparent = String.valueOf(R.mipmap.sym_def_app_icon) //e.g.ic_action_play is sample name for transparent small icon options.transparentIconBgColor = "#FF0000" options.placeHolderIcon = "ic_notification" //e.g.ic_notification is sample name for placeholder icon SmartPush.getInstance(WeakReference(this)).setNotificationOptions(options) } }
Editor is loading...
Leave a Comment