This is a class which helps create notification for you app. Import Statement for NotificationManager class android.app.NotificationManager
Questions tagged [notificationmanager]
233 questions
13
votes
3 answers
notificationManager get notification by Id
Anyone know any way to get a notification by id? It's I want when get a new notification if it is still being shown in the status bar of Android want to get the information and add it to a new notification. Thank you.

Gustavo Rozolin
- 1,070
- 2
- 13
- 21
11
votes
2 answers
ExoPlayer Notification Manager, hide fast rewind and fast forward buttons
I am trying to implement ExoPlayer's Notification Manager, it works pretty well but I do not want to show fast rewind and fast forward buttons. I checked documentation but can not find a way to hide these button. Is there any tricky way to hide…

ysfcyln
- 2,857
- 6
- 34
- 61
11
votes
2 answers
GCM push notification. Bad notification posted - Couldn't expand RemoteViews for: StatusBarNotification
The requirement was to make a custom notification since the android's default notification only allows for an image. So I went through on how to attach a custom UI for notification when expanded, the ready answer was to create a custom view and pass…

DJphy
- 1,292
- 1
- 17
- 31
11
votes
4 answers
Is it possible to cancel all notifications that have a certain tag?
I'm making an android app and I would like to cancel all notifications that have a certain tag.
Right now it only seems possible to cancel notifications by their id (int id) or by both their ids and tags.
mNotificationManager.cancel(int id);
or…

Abe
- 153
- 1
- 8
9
votes
1 answer
Android: Multiple Notifications as single list in Status Bar
I am trying to Notify user based on some criteria. Multiple Notifications are being shown in Status Bar but I want to Group the notification in single notification and when user clicks in the Status Bar, I want to retrieve all notifications in that…

Mustansar Saeed
- 2,730
- 2
- 22
- 46
8
votes
3 answers
In Android how can i know the current notification id to clear the notification
Now in android i put this code in one activity to show notification when a button pressed.
static int notificationCount = 0;
then
btnNotification.setOnClickListener(
new View.OnClickListener() {
@Override
…

Marzouk
- 2,650
- 3
- 25
- 56
8
votes
2 answers
Is it possible to set how long a notification is displayed in android API level 10 or lower?
Research
I've been looking through the NotificationManager class in the android documentation for API level 10 and haven't found a way to implement this. I also looked around on google but only found how to set the time at which the notification is…

devonbleibtrey
- 1,567
- 16
- 22
7
votes
3 answers
How does one animate the Android sync status icon?
I simply want to start and stop the sync icon that is in the status bar. I thought it would be a simple call using NotificationManager, but I cannot find the documentation or sample Q&A on the web or SO.

mobibob
- 8,670
- 20
- 82
- 131
7
votes
2 answers
Notification Not Appearing on notify()
I have been having difficulties lately getting many specific functions to work on Android Studio. Recently I am working on trying to display simple notifications. They never show up. I feel like I have tried everything at this point. Here's my…

Jermaine Oliver
- 115
- 1
- 7
7
votes
3 answers
NotificationManager.cancel() doesn't work: Notification isn't removed
I've been trying to remove a persistent Notification set by a Service using:
startForeground(1337, notification);
The code I'm using to cancel it:
NotificationManager nManager = (NotificationManager)…

slinden77
- 3,378
- 2
- 37
- 35
7
votes
2 answers
Update notification vibrate/ringtone
I am using the NotificationManager builder to show an alert in my app. I know that the first parameter for the notify method is an id and the framework will update the notification if it is already visible, but if I set the alert to play a ringtone…

Kris B
- 3,436
- 9
- 64
- 106
6
votes
2 answers
How to create a status bar icon on the right side? (Android)
Notification and NotificationManager are used to create icons to be placed on the top-left position of the screen. A Notification also need to have an entry on the status bar pull-down.
However, icons on the right side such as the battery, signal…

Randy Sugianto 'Yuku'
- 71,383
- 57
- 178
- 228
5
votes
1 answer
How to implement Notification service (not using Activity) in Android
I am implementing notification my app just example.
Service class file:
public class Services
{
public void myNotify(Context context,String message)
{
Log.v("my notification method","from GetNotification class");
NotificationManager…

Narasimha
- 3,802
- 11
- 55
- 83
5
votes
1 answer
Cancel (and hide) Android notification programmatically
I have a service running in conjunction with a Notification (System). When the service stops (and/or the app stops), the notification should be cancelled (i.e. not showing on the status bar anymore).
Going through the provide Android Dev guide of…

CybeX
- 2,060
- 3
- 48
- 115
5
votes
4 answers
Android : Unable to display multiple lines of text in Notification
I am trying to display multiple lines of Text using BigTextStyle in Notification but unable to do so. I am using the code below.
public void sendNotification(View view) {
String msgText = "Jeally Bean Notification example!! "
+…

Vipul J
- 6,641
- 9
- 46
- 61