Helper class for displaying notifications.
More...
|
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.
|
|
Helper class for displaying notifications.
- Since
- 6.1
◆ clear() [1/2]
static void clear |
( |
Context | context, |
|
|
int | notificationId ) |
|
static |
Clear a notification.
- Parameters
-
context | context used to launch notification |
notificationId | unique 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
-
context | context used to launch notification |
notificationTag | tag for the notification to clear |
notificationId | unique 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
-
context | context used to launch notification |
options | notification 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
-
context | context used to launch notification |
notificationChannel | channel group for this notification |
notificationId | unique identifier for this notification |
title | notification title |
message | notification message |
pendingIntent | intent 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
-
context | context used to launch notification |
options | notification options |
- Since
- 14.0
◆ createNotification() [2/5]
static void createNotification |
( |
Context | context, |
|
|
String | notificationChannel, |
|
|
int | notificationId, |
|
|
String | title ) |
|
static |
Create a notification.
- Parameters
-
context | context used to launch notification |
notificationChannel | channel group for this notification |
notificationId | unique identifier for this notification |
title | notification 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
-
context | context used to launch notification |
notificationChannel | channel group for this notification |
notificationId | unique identifier for this notification |
title | notification title |
message | notification 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
-
context | context used to launch notification |
notificationChannel | channel group for this notification |
notificationId | unique identifier for this notification |
title | notification title |
message | notification message |
subtext | notification 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
-
context | context used to launch notification |
notificationChannel | channel group for this notification |
notificationId | unique identifier for this notification |
title | notification title |
message | notification message |
subtext | notification subtext |
nbh | handler 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
-
iconId | resource 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
-
activityToLaunch | actvity 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
-
- Since
- 6.1
The documentation for this class was generated from the following file: