Speedify SDK for Android 15.5.0
Loading...
Searching...
No Matches
NotificationHelper Class Reference

Helper class for displaying notifications. More...

Classes

interface  BuilderHelper
 Helper interface for customizing the notification builder. More...
 
class  Options
 Parameters for draining a notification. More...
 

Static Public Member Functions

static void setVibePattern (long[] pattern)
 Set vibration pattern to be used.
 
static void setLauncherClass (Class activityToLaunch)
 Set activity class to launch when clicking on notifications.
 
static void setDefaultIcon (int iconId)
 Set defalt icon used in notifications from this class.
 
static void createNotification (Context context, String notificationChannel, int notificationId, String title)
 Create a notification.
 
static void createNotification (Context context, String notificationChannel, int notificationId, String title, String message)
 Create a notification.
 
static void createNotification (Context context, String notificationChannel, int notificationId, String title, String message, String subtext)
 Create a notification.
 
static void createNotification (Context context, String notificationChannel, int notificationId, String title, String message, String subtext, BuilderHelper nbh)
 Create a notification.
 
static void createBackgroundActivityNotification (Context context, String notificationChannel, int notificationId, String title, String message, PendingIntent pendingIntent)
 Create a fullscreen notification from the background.
 
static void createNotification (Context context, Options options)
 Create a notification.
 
static void createBackgroundActivityNotification (Context context, Options options)
 Create a fullscreen notification from the background.
 
static void clear (Context context, int notificationId)
 Clear a notification.
 
static void clear (Context context, String notificationTag, int notificationId)
 Clear a notification.
 

Detailed Description

Helper class for displaying notifications.

Since
6.1

Member Function Documentation

◆ clear() [1/2]

static void clear ( Context context,
int notificationId )
static

Clear a notification.

Parameters
contextcontext used to launch notification
notificationIdunique identifier for the notification to clear
Since
9.3

◆ clear() [2/2]

static void clear ( Context context,
String notificationTag,
int notificationId )
static

Clear a notification.

Parameters
contextcontext used to launch notification
notificationTagtag for the notification to clear
notificationIdunique identifier for the notification to clear
Since
14.0

◆ createBackgroundActivityNotification() [1/2]

static void createBackgroundActivityNotification ( Context context,
Options options )
static

Create a fullscreen notification from the background.

Parameters
contextcontext used to launch notification
optionsnotification options
Since
14.0

◆ createBackgroundActivityNotification() [2/2]

static void createBackgroundActivityNotification ( Context context,
String notificationChannel,
int notificationId,
String title,
String message,
PendingIntent pendingIntent )
static

Create a fullscreen notification from the background.

Parameters
contextcontext used to launch notification
notificationChannelchannel group for this notification
notificationIdunique identifier for this notification
titlenotification title
messagenotification message
pendingIntentintent this fullscreen notification should launch
Since
8.1
Deprecated
As of 14.0. use createBackgroundActivityNotification(Context, Options) instead

◆ createNotification() [1/5]

static void createNotification ( Context context,
Options options )
static

Create a notification.

Parameters
contextcontext used to launch notification
optionsnotification options
Since
14.0

◆ createNotification() [2/5]

static void createNotification ( Context context,
String notificationChannel,
int notificationId,
String title )
static

Create a notification.

Parameters
contextcontext used to launch notification
notificationChannelchannel group for this notification
notificationIdunique identifier for this notification
titlenotification title
Since
6.1
Deprecated
As of 14.0. use createNotification(Context, Options) instead

◆ createNotification() [3/5]

static void createNotification ( Context context,
String notificationChannel,
int notificationId,
String title,
String message )
static

Create a notification.

Parameters
contextcontext used to launch notification
notificationChannelchannel group for this notification
notificationIdunique identifier for this notification
titlenotification title
messagenotification message
Since
6.1
Deprecated
As of 14.0. use createNotification(Context, Options) instead

◆ createNotification() [4/5]

static void createNotification ( Context context,
String notificationChannel,
int notificationId,
String title,
String message,
String subtext )
static

Create a notification.

Parameters
contextcontext used to launch notification
notificationChannelchannel group for this notification
notificationIdunique identifier for this notification
titlenotification title
messagenotification message
subtextnotification subtext
Since
6.1
Deprecated
As of 14.0. use createNotification(Context, Options) instead

◆ createNotification() [5/5]

static void createNotification ( Context context,
String notificationChannel,
int notificationId,
String title,
String message,
String subtext,
BuilderHelper nbh )
static

Create a notification.

Parameters
contextcontext used to launch notification
notificationChannelchannel group for this notification
notificationIdunique identifier for this notification
titlenotification title
messagenotification message
subtextnotification subtext
nbhhandler providing access to the base NotificationCompat.Builder object for further customization
Since
11.1
Deprecated
As of 14.0. use createNotification(Context, Options) instead

◆ setDefaultIcon()

static void setDefaultIcon ( int iconId)
static

Set defalt icon used in notifications from this class.

Parameters
iconIdresource id of icon to use
Since
9.3.1

◆ setLauncherClass()

static void setLauncherClass ( Class activityToLaunch)
static

Set activity class to launch when clicking on notifications.

Null to disable.

Parameters
activityToLaunchactvity class to launch
Since
6.1

◆ setVibePattern()

static void setVibePattern ( long[] pattern)
static

Set vibration pattern to be used.

A null or empty array disabled vibration.

Parameters
patternvibration pattern
Since
6.1

The documentation for this class was generated from the following file: