Package com.dimelo.dimelosdk.main
Class Dimelo.BasicNotificationDisplayer
java.lang.Object
com.dimelo.dimelosdk.main.Dimelo.BasicNotificationDisplayer
- All Implemented Interfaces:
Dimelo.NotificationDisplayer
- Enclosing class:
- Dimelo
public static class Dimelo.BasicNotificationDisplayer
extends Object
implements Dimelo.NotificationDisplayer
An abstract class which implement NotificationDisplayer This is the easiest way to display notifications. It build the notification and ask for a title, an icon and an intent to launch if the notification is clicked.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionandroid.app.PendingIntent
createPendingIntent
(android.content.Context context, String message) Create and return a PendingIntent allowing to specify what happens if the user click on a notification (for Android >= 5.0)final void
displayNotification
(android.content.Context context, String message) An implementation of NotificationDisplayer.displayNotification which shows a default notification.int
An icon displayed inside the notificationint
getSmallIcon
(android.content.Context context, String message) An icon displayed inside the notificationvoid
setActivity
(Class<?> activity)
-
Field Details
-
NOTIFICATION_ID
public static final int NOTIFICATION_ID- See Also:
-
NOTIFICATION_CHANNEL_ID
- See Also:
-
KEY_INLINE_REPLY
- See Also:
-
-
Constructor Details
-
BasicNotificationDisplayer
public BasicNotificationDisplayer()
-
-
Method Details
-
setActivity
-
createPendingIntent
@NonNull public android.app.PendingIntent createPendingIntent(android.content.Context context, String message) Create and return a PendingIntent allowing to specify what happens if the user click on a notification (for Android >= 5.0) -
getSmallIcon
An icon displayed inside the notification -
getColor
An icon displayed inside the notification -
displayNotification
An implementation of NotificationDisplayer.displayNotification which shows a default notification. A Heads-up notification is chown on Android >= 5.0, otherwise a Ticker is shown
- Specified by:
displayNotification
in interfaceDimelo.NotificationDisplayer
-