-
public class ZTPush extends ZTPushComponent
-
-
Field Summary
Fields Modifier and Type Field Description private ZTIOScopeztComponentScopepublic final static ZTPushINSTANCE
-
Method Summary
Modifier and Type Method Description final UnitinitConfig(ZTNotificationConfig config)Set the notification configuration final BooleanhandleMessage(Context context, RemoteMessage remoteMessage, @DrawableRes() Integer smallIcon)final UnitsetActionBackgroundCallback(Function1<ZTNotificationInfo, Unit> onBackGroundActionCallBack)Callback for background action button click event final UnitsetNonZtNotificationCallback(Function1<RemoteMessage, Unit> onNonZtNotificationCallBack)Callback for non ztnotification. final ZTNotificationInfogetNotificationInfo(Intent intent)Extract notification from the intent final UnitremoveNotification(Context context, Integer notificationId, String tag)Remove the notification from the system tray final UnittrackNotificationDelivered(String notificationId)Method for sending push message delivery status final UnittrackEvent(ZTNotificationInfo notificationInfo)UnitfetchDeviceToken(Function1<String, Unit> onDeviceToken)final UnitcheckGooglePlayServicesStatus(Context context, Function1<PlayServicesStatus, Unit> result)final ZTIOScopegetZtComponentScope()final UnitsetZtComponentScope(ZTIOScope ztComponentScope)-
-
Method Detail
-
initConfig
final Unit initConfig(ZTNotificationConfig config)
Set the notification configuration
-
handleMessage
final Boolean handleMessage(Context context, RemoteMessage remoteMessage, @DrawableRes() Integer smallIcon)
-
setActionBackgroundCallback
final Unit setActionBackgroundCallback(Function1<ZTNotificationInfo, Unit> onBackGroundActionCallBack)
Callback for background action button click event
- Parameters:
onBackGroundActionCallBack- : Callback listener
-
setNonZtNotificationCallback
final Unit setNonZtNotificationCallback(Function1<RemoteMessage, Unit> onNonZtNotificationCallBack)
Callback for non ztnotification.
- Parameters:
onNonZtNotificationCallBack- : Callback listener
-
getNotificationInfo
final ZTNotificationInfo getNotificationInfo(Intent intent)
Extract notification from the intent
-
removeNotification
final Unit removeNotification(Context context, Integer notificationId, String tag)
Remove the notification from the system tray
- Parameters:
context- : Application contextnotificationId- : Notification local idtag- : Notification tag
-
trackNotificationDelivered
final Unit trackNotificationDelivered(String notificationId)
Method for sending push message delivery status
- Parameters:
notificationId- : Notification message id
-
trackEvent
final Unit trackEvent(ZTNotificationInfo notificationInfo)
-
fetchDeviceToken
Unit fetchDeviceToken(Function1<String, Unit> onDeviceToken)
-
checkGooglePlayServicesStatus
final Unit checkGooglePlayServicesStatus(Context context, Function1<PlayServicesStatus, Unit> result)
-
getZtComponentScope
final ZTIOScope getZtComponentScope()
-
setZtComponentScope
final Unit setZtComponentScope(ZTIOScope ztComponentScope)
-
-
-
-