Questions tagged [notifications]

A notification is a user interface element displayed to indicate an event has occurred.

A notification is a user interface element displayed to indicate an event has occurred.

Notifications typically occur in a designated area of an application's UI, such as an icon appearing in a status bar or an alert message.

15974 questions
64
votes
6 answers

Firebase (FCM): open activity and pass data on notification click. android

There should be clear implementation of how to work with Firebase notification and data. I read many answers but can't seem to make it work. here are my steps: 1.) I am passing notification and data to android in PHP and it seems to be fine: $msg =…
62
votes
11 answers

Android - Build a notification, TaskStackBuilder.addParentStack not working

I'm trying to launch an activity from a notification like the Android docs explain, but when I open the notification and then press the back button, the HomeActivity (parent) doesn't open, instead the application closes. What am I doing wrong? …
David Fortunato
  • 769
  • 1
  • 6
  • 19
61
votes
5 answers

Notification multiline

How to make a long notification multiline. I am using the below code snippet but its not working: NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setContentTitle(title) .setSmallIcon(R.drawable.icon) …
teja
  • 661
  • 2
  • 6
  • 5
61
votes
9 answers

How to create a notification with NotificationCompat.Builder?

I need to create a simple notification which will be shown in notification bar along with the sound and icon if possible? I also need it to be compatitible with Android 2.2, so i found that NotificationCompat.Builder works with all APIs above 4. If…
59
votes
3 answers

Local Notifications in Android?

In iOS, a "Local Notification" is used by an app when it is in the background, to inform the user that something has happened, that they might want to pay attention to: Local notifications ... to inform users when new data becomes available for…
Arsalan Haider
  • 621
  • 1
  • 6
  • 7
55
votes
6 answers

Is it possible to check if a notification is visible or canceled?

I would like to update notification data, but the only way I found is to launch a new one with the same Id. The problem is that I don't want to raise a new one if the original has beed canceled. Is there a way to tell if a notification is visible or…
Asaf Pinhassi
  • 15,177
  • 12
  • 106
  • 130
54
votes
4 answers

Android: How to create an "Ongoing" notification?

Hello, How do i create the permanent notification like the first one for Battery Indicator?
Rohith Nandakumar
  • 11,367
  • 11
  • 50
  • 60
54
votes
4 answers

Notification system using php and mysql

I wanted to implement a notification system for our school, it's a php/mysql webapp that is not opened for public, so it doesn't receive much traffic. "daily 500-1000 visitor". 1. My initial approach was using MYSQL triggers: I used a Mysql AFTER…
Zalaboza
  • 8,899
  • 16
  • 77
  • 142
54
votes
1 answer

Can NoticationManager.notify() be called from a worker thread?

My question is more about what is a good practice than what is possible: Is it a good thing to call NoticationManager.notify() from a worker thread? Does the system execute it in the UI thread anyway or not? I always try to keep in mind that stuff…
Joffrey
  • 32,348
  • 6
  • 68
  • 100
53
votes
4 answers

Updating an ongoing notification quietly

I have a service which connects to other devices wirelessly. When the service is enabled, I have an ongoing notification which states it is enabled. After the service is enabled, the user then connects to another device. At this point, I would…
howettl
  • 12,419
  • 13
  • 56
  • 91
53
votes
4 answers

Cocoa - Notification on NSUserDefaults value change?

Let's say I have a key @"MyPreference", with a corresponding value stored through NSUserDefaults. Is there a way to be notified when the value is modified? Or could it be done through bindings? (But this case, instead of binding the value to a UI…
SirRatty
  • 1,641
  • 3
  • 17
  • 18
52
votes
9 answers

How to get TFS Build Status notifications?

I want to get the build status in TFS (whether it is succeeded or failed). Which classes and methods can be used for this purpose?
Suneetha
52
votes
11 answers

How to show a notification without a sound java

How can I make a notification that doesn't make a sound when I build it? I am building a notification, and my users don't like the fact that it makes a sound. How can I change it to a silent one / no sound at all? How I show…
Jason
  • 1,658
  • 3
  • 20
  • 51
52
votes
3 answers

How to make a Windows Notification in Java

In Windows 10 there is a notification that opens in the bottom right of the screen and I find them quite useful. Is there is any way to create Windows notifications in Java? This is what they look like:
Bill Nye
  • 831
  • 1
  • 10
  • 15
52
votes
8 answers

How do I check whether my app is allowed to post notifications?

Users can turn off notifications for individual apps in Android settings. Is there a method like isNotificationsAllowed() that allows me to check whether my app is allowed to post notifications? Also, how do I open the Android settings screen to…
Yunpeng Lee
  • 545
  • 1
  • 4
  • 6