Questions tagged [android-notifications]

A status notification adds an icon to the system's status bar (with an optional ticker-text message) and a notification message in the notifications window.

A notification is a user interface element that you display outside your app's normal UI to indicate that an event has occurred. Users can choose to view the notification while using other apps and respond to it when it's convenient for them.

Think of notifications as a news channel that alerts the user to important events as they happen or a log that chronicles events while the user is not paying attention. The user can expand the notification bar and by selecting the notification the user can trigger another activity. Notifications in Android are represented by the Notification class. To create notifications you use the NotificationManager class which can be received from the Activity via the getSystemService() method.

Useful links

4920 questions
2
votes
0 answers

Android: Recognize if notifications for app disabled from apps menu

How can I know if the user unchecked the "Show notifications" for my app from Settings->apps->my_app? There is this topic but It's seems still not clear whether if there is some workaround here or even if such exist - Google will 'close it in the…
michael
  • 3,835
  • 14
  • 53
  • 90
2
votes
0 answers

Any way to tell if user has disabled Notification "peeking"?

There's a new option in Android 6.0 that lets users disable notification Peeking, is there a way to tell whether peeking is enabled or disabled for my app?
Mohamed Hafez
  • 8,621
  • 7
  • 41
  • 49
2
votes
1 answer

How to play Notification sound even in silent mode and return back to its stat

I'm trying to play notification sound even if silent mode is on Uri uri = Uri.parse(alarmSound); notification.setSound(uri); AudioManager mobileMode = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); int…
Al-Mothafar
  • 7,949
  • 7
  • 68
  • 102
2
votes
1 answer

Android wearable stacked notifications

I was playing with stacked notifications but I can't make it work, the notifications don't fire at all. Here's the code: private void sendSimpleStackedNotifications() { NotificationCompat.WearableExtender wearableExtender = new…
GuilhE
  • 11,591
  • 16
  • 75
  • 116
2
votes
1 answer

How to get multiple notifications in Android

In one activity I have three DatePickerDialog where the user can put three date for a reminder purpose. The app must notify each date and if the user enters two or three equal date they must be notified in sequence . My problem is that only the last…
2
votes
1 answer

Notification intent is not working

I am trying to launch a new activity on click of notification. But problem is that notification intent is not working and when i click on notification it do nothing. Means its not launch new activity(Notificationjump.class). Here is my code public…
2
votes
1 answer

Sending different parameters to pendingIntent through notification

My target: download files in parallel, and when file downloads complete, I get notifications. Those notifications are suppose to launch an activity when you click on it which gets unique parameters through putExtra. The problem is that I can't have…
rayman
  • 20,786
  • 45
  • 148
  • 246
2
votes
1 answer

Control my web radio player from notification with NotificationCompat.MediaStyle and MediaSessionCompat

I have an app that reproduces from the service a webradio (using AACDecoder lib) and show on a simple ongoing notification what is playing while the activity is not resumed. What i want is to add by NotificationCompat.MediaStyle a button to stop…
Informatheus
  • 1,025
  • 1
  • 9
  • 20
2
votes
1 answer

Android Lollipop notification icon too small

I started to add notifications to my app and want it to display my app icon in the notification drawer. The problem is, the icon is really small and does not fill out the entire circle, it leaves a light-blue (TouchWiz, I think white on stock)…
qwertz
  • 6,206
  • 9
  • 40
  • 62
2
votes
4 answers

Android: Passing a variable to a non-activity class

I am trying to pass a String from my MainActivity to a non-activity class (A Notification Service) So that I can customise the notification message. I have tried using Intent however it won't work because it is a non-activity based class. What is…
2
votes
1 answer

Open Application home page after dismissing notification

Upon pressing the back button, after opening the notification, the user is taken back to the Home screen instead of going back to the main page of the application. (Using a Samsung S5 with Android 5.0) The notification is built and shown as follows:…
T-D
  • 373
  • 8
  • 21
2
votes
1 answer

android GCM receiver triggered after install and sending empty notif

I have class that inheritance NotificationHandler from azure in my project. Everything works fine before i update my project (without any changes in the receiver). Now, every time i install the application, the NotificationHandler always triggered…
2
votes
3 answers

How do you change a notification action button's icon?

When you build a notification and add an action button using .addAction(int icon, CharSequence title, PendingIntent intent) is there a way to change the icon when pressed?
user1840378
  • 349
  • 2
  • 13
2
votes
0 answers

How to quit android application(along with services) from notification button

I am making a music player app. I made a custom notification with player buttons. While other things are just working fine, I am unable to find on how can I quit application when user presses quit button on the notification. I tried system.exit()…
2
votes
1 answer

Android display notification number next to menu item

I want to display a notification number on a menu item in the overflow stack to indicate there are x updates available. I know you can set an icon to the menu item, but I want to display the number on the right side of the menu item (Instabridge…
qwertz
  • 6,206
  • 9
  • 40
  • 62