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
1 answer

How to read the facebook notification count in android

Hi am working on a project in which i need to show the notification. I used "NotificationListenerService" and i struct in the facebook notification account I need to show the notification count in my app. Need to show inside my app " Facebook has 15…
2
votes
0 answers

phonegap push notification without GCM google cloud messaging

It is possible to implement notification push in phonegapp without passing to google cloud messaging? I could find just the plugins that use gcm like this: https://github.com/phonegap/phonegap-plugin-push exist a different solution without passing…
2
votes
4 answers

Clicking custom Notification button

This is my notification, i need event when clicking button on notification. setOnClickPendingIntent doesn't work for me. R.layout.mynotification is under the code. (I don't want addAction). Intent intent = new Intent(Fragmentz.ctx,…
2
votes
2 answers

Android notifications does not disappear after click

I have a piece of code on my android studio project: private void sendNotification(String msg) { mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE); PendingIntent…
Niranbd
  • 33
  • 7
2
votes
1 answer

The device token has expired or the application is unregistered from notifications

After sending and receiving some notifications using Pushwoosh, for no reason I'm receiving this error in Pushwoosh Push History and nothing is delivering to the cellphone... The error is : The device token has expired or the application is…
Dr TJ
  • 3,241
  • 2
  • 35
  • 51
2
votes
1 answer

How to set repeating alarm using setExact and how to cancel the same?

I am setting notifications using alarm manager and broadcast receiver. I have tried to use setInexactRepeating method of an alarm manager but it dose not raise alarms at exact time above API 19. So I got a suggestion to use setExact method and set…
Sid
  • 2,792
  • 9
  • 55
  • 111
2
votes
0 answers

notification position changes on updating

I am having error that whenever I update the notification it puts my notification on Top and then notification from other app comes first and and when my notification is updated again(every 1 sec) my notification comes on top again and this goes…
2
votes
0 answers

Allow Notification Access to Android Application without starting a android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS activity

I have created an application for accessing notifications using NotificationListenerService, but first I have to allow notification access manually to read notifications by starting another android Activity using: Intent intent = new…
2
votes
1 answer

Use Eddystone Beacon to Show notification in Android Status Bar

I've been able to successfully create an app (thanks davidgyoung!) that monitors beacons in the background and then subsequently opens the app in the background. Now I would like my app to first prompt with a notification in the status bar saying…
2
votes
2 answers

Notification doesn't appear in foreground service

I'm using the following code: private void startForeground(boolean isActive) { Intent notificationIntent = new Intent(this, MainActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(this, 1, notificationIntent,…
artem
  • 16,382
  • 34
  • 113
  • 189
2
votes
2 answers

Sending the notification without a button Android

I'm trying to make an app which downloads (periodically) data from a server and notifies the user when downloaded. I tried to use Toast message, but I need a notification in the status bar. I used some sample code from developer.android.com which…
Maciekb
  • 17
  • 4
2
votes
1 answer

Android system theme adding its own background to the icon of notification

I've created a simple notification using NotificationCompat. Following is my code NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mContext); mBuilder.setSmallIcon(icon) .setTicker(title) .setWhen(0) …
2
votes
1 answer

Notification onBackpressed should opens default LAUNCHER activity always

I have implemented gcm Notification's for my android app with PendingIntent which will take user to an Activity when notification will be clicked now, I have defined types of notification's switching user to other's activities and when user press…
Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65
2
votes
1 answer

Opening particular folder on clicking on status Notification

I am displaying downlaoded file progress in status Notification.I want to open particular downloaded folder on clicking on notification once download is over.I used below code but it is always opening first “Open From” window and when i select “File…
2
votes
2 answers

How to create a persistent Android Service

In the Android documentation for running a Service in the forground, the following example code is provided: Notification notification = new Notification(R.drawable.icon, getText(R.string.ticker_text), System.currentTimeMillis()); Intent…
vcapra1
  • 1,988
  • 3
  • 26
  • 45