-
- All Implemented Interfaces:
public class NotificationHelper
-
-
Field Summary
Fields Modifier and Type Field Description private final String
DEFAULT_POINTR_NOTIFICATION_CHANNEL
public final static NotificationHelper
INSTANCE
-
Method Summary
Modifier and Type Method Description final Unit
showNotification(Context context, Integer id, String title, String message, @DrawableRes() Integer smallIcon, PendingIntent contentIntent, String notificationChannel)
Shows notification with given title as contentTitle and given message as contentText final Unit
createNotificationChannel(Context context, String channel)
Creates the notification channel if not created previously. final Unit
clearNotification(Context context, Integer notificationId)
Clears the notification with given notificationId final String
getDEFAULT_POINTR_NOTIFICATION_CHANNEL()
-
-
Method Detail
-
showNotification
final Unit showNotification(Context context, Integer id, String title, String message, @DrawableRes() Integer smallIcon, PendingIntent contentIntent, String notificationChannel)
Shows notification with given title as contentTitle and given message as contentText
-
createNotificationChannel
final Unit createNotificationChannel(Context context, String channel)
Creates the notification channel if not created previously.
-
clearNotification
final Unit clearNotification(Context context, Integer notificationId)
Clears the notification with given notificationId
- Parameters:
notificationId
- to clear associated notification
-
getDEFAULT_POINTR_NOTIFICATION_CHANNEL
final String getDEFAULT_POINTR_NOTIFICATION_CHANNEL()
-
-
-
-