@Implements(value=android.app.NotificationManager.class, looseSignatures=true) public class ShadowNotificationManager extends java.lang.Object
Constructor and Description |
---|
ShadowNotificationManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
areNotificationsEnabled() |
void |
cancel(int id) |
void |
cancel(java.lang.String tag,
int id) |
void |
cancelAll() |
void |
createNotificationChannel(java.lang.Object channel) |
void |
createNotificationChannelGroup(java.lang.Object group) |
void |
createNotificationChannels(java.util.List<java.lang.Object> channelList) |
void |
deleteNotificationChannel(java.lang.String channelId) |
void |
deleteNotificationChannelGroup(java.lang.String channelGroupId)
Delete a notification channel group and all notification channels associated with the group.
|
android.service.notification.StatusBarNotification[] |
getActiveNotifications() |
java.util.List<android.app.Notification> |
getAllNotifications() |
protected int |
getCurrentInterruptionFilter() |
android.app.Notification |
getNotification(int id) |
android.app.Notification |
getNotification(java.lang.String tag,
int id) |
java.lang.Object |
getNotificationChannel(java.lang.String channelId) |
java.lang.Object |
getNotificationChannelGroup(java.lang.String id) |
java.util.List<java.lang.Object> |
getNotificationChannelGroups() |
java.util.List<java.lang.Object> |
getNotificationChannels() |
boolean |
isChannelDeleted(java.lang.String channelId)
Checks whether a channel is considered a “deleted” channel by Android.
|
void |
notify(int id,
android.app.Notification notification) |
void |
notify(java.lang.String tag,
int id,
android.app.Notification notification) |
void |
setInterruptionFilter(int interruptionFilter)
Currently does not support checking for granted policy access.
|
void |
setNotificationsEnabled(boolean areNotificationsEnabled) |
int |
size() |
@Implementation public void notify(int id, android.app.Notification notification)
@Implementation public void notify(java.lang.String tag, int id, android.app.Notification notification)
@Implementation public void cancel(int id)
@Implementation public void cancel(java.lang.String tag, int id)
@Implementation public void cancelAll()
@Implementation(minSdk=24) public boolean areNotificationsEnabled()
public void setNotificationsEnabled(boolean areNotificationsEnabled)
@Implementation(minSdk=23) public android.service.notification.StatusBarNotification[] getActiveNotifications()
@Implementation(minSdk=26) public java.lang.Object getNotificationChannel(java.lang.String channelId)
@Implementation(minSdk=26) public void createNotificationChannelGroup(java.lang.Object group)
@Implementation(minSdk=26) public java.util.List<java.lang.Object> getNotificationChannelGroups()
@Implementation(minSdk=26) public void createNotificationChannel(java.lang.Object channel)
@Implementation(minSdk=26) public void createNotificationChannels(java.util.List<java.lang.Object> channelList)
@Implementation(minSdk=26) public java.util.List<java.lang.Object> getNotificationChannels()
@Implementation(minSdk=26) public void deleteNotificationChannel(java.lang.String channelId)
@Implementation(minSdk=26) public void deleteNotificationChannelGroup(java.lang.String channelGroupId)
Delete a notification channel group and all notification channels associated with the group. This method will not notify any NotificationListenerService of resulting changes to notification channel groups nor to notification channels.
@Implementation(minSdk=23) protected final int getCurrentInterruptionFilter()
NotificationManager.INTERRUPTION_FILTER_ALL
by default, or the value specified via setInterruptionFilter(int)
@Implementation(minSdk=23) public final void setInterruptionFilter(int interruptionFilter)
Currently does not support checking for granted policy access.
NotificationManager.getCurrentInterruptionFilter()
public boolean isChannelDeleted(java.lang.String channelId)
Checks whether a channel is considered a “deleted” channel by Android. This is a channel that was created but later deleted. If a channel is created that was deleted before, it recreates the channel with the old settings.
public java.lang.Object getNotificationChannelGroup(java.lang.String id)
public int size()
public android.app.Notification getNotification(int id)
public android.app.Notification getNotification(java.lang.String tag, int id)
public java.util.List<android.app.Notification> getAllNotifications()