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 Details

  • Constructor Details

    • BasicNotificationDisplayer

      public BasicNotificationDisplayer()
  • Method Details

    • setActivity

      public void setActivity(Class<?> activity)
    • 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

      @DrawableRes public int getSmallIcon(android.content.Context context, String message)
      An icon displayed inside the notification
    • getColor

      @ColorInt public int getColor(android.content.Context context, String message)
      An icon displayed inside the notification
    • displayNotification

      public final void displayNotification(android.content.Context context, String message)
       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 interface Dimelo.NotificationDisplayer