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
30
votes
3 answers

How to stop service from its own foreground notification

I have a Service running. and in its onStartCommand I am doing startforeground to avoid killing by system. public int onStartCommand(Intent intent, int flags, int startId) { if (ACTION_STOP_SERVICE.equals(intent.getAction())) { …
SimpleCoder
  • 1,665
  • 1
  • 21
  • 34
29
votes
2 answers

IOS 14 UNNotificationPresentationOptions.list, .banner vs alert

Hello I am trying to display some notification datas. In my notification I have a notification id to react deferently based on the pushed information. I just cannot see what are those new UNNotificationPresentationOptions. in…
FitzChill
  • 815
  • 8
  • 18
29
votes
3 answers

Is there a way to make Colab give an Audio Notification when cell has finished running

I am coding Neural Network models and trainings are long to run so I would like to go doing something else then go back as soon as the cell has finished running. There is already a way to track this since the Tab Icon is grey when busy then yellow…
Atralb
  • 724
  • 2
  • 8
  • 17
29
votes
5 answers

How to send a Facebook notification through their API

I asked this on the Facebook Developers Forum with no responses.. How do I send notifications to users so they show up in the Notifications globe icon tab on the top left of a user's Facebook page? Some applications I use have their notifications…
at.
  • 50,922
  • 104
  • 292
  • 461
29
votes
4 answers

Send a notification when the app is closed

How is it possible to send a notification programmatically, when the App got completely closed? Example: The User closed the App, also in the Android Taskmanager, and waits. The App should send a notification after X Seconds or when the App check…
Excel1
  • 557
  • 1
  • 7
  • 20
29
votes
6 answers

Android Notification intent to clear it self

I have read many examples of how to create notification messages. What i wanted to achieve, is because the notification will be executed by a widget, i would like the notification intent when clicked to clear it self when the user clicks on it.I do…
John
  • 517
  • 2
  • 8
  • 16
29
votes
2 answers

In Android, How can I avoid the onStart method from being deprecated?

I am having a problem with setting the onStart method in my app. It always has a strikethrough, saying "This method was deprecated in API level 5. I need onStart, not onStartCommand. How can I resolve this? MyNotificationService.java import…
Christopher Treanor
  • 505
  • 2
  • 8
  • 13
29
votes
3 answers

Create a persistent notification and prevent notification in status bar

I have the following code which I am using for an android app: package com.authorwjf.e_notifications; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import…
Dino
  • 1,445
  • 4
  • 24
  • 43
28
votes
3 answers

How to pass and run a callback method in Python

I have a Manager (main thread), that creates other Threads to handle various operations. I would like my Manager to be notified when a Thread it created ends (when run() method execution is finished). I know I could do it by checking the status of…
nbarraille
  • 9,926
  • 14
  • 65
  • 92
28
votes
1 answer

LISTEN/NOTIFY using pg_notify(text, text) in PostgreSQL

I have been playing with PostgreSQL's notification system and cannot for the life of my figure out why pg_notify(text, text) never works. This feature is not overly documented and I cannot find many examples of it being used in the wild so I figured…
Abstrct
  • 793
  • 1
  • 6
  • 9
28
votes
9 answers

Android foreground service notification not showing

I am trying to start a foreground service. I get notified that the service does start but the notification always gets suppressed. I double checked that the app is allowed to show notifications in the app info on my device. Here is my code: private…
Dreamers Org
  • 1,151
  • 3
  • 12
  • 30
28
votes
8 answers

NotificationCompat.setStyle() can't get Notification.MediaStyle

I've found out that the MediaStyle setStyle is not working when I'm using NotificationCompat.builder(this) to make a notification. I mean, When using this on NotificationCompat.Builder(this): .setStyle(new Notification.MediaStyle() …
user3184899
  • 3,019
  • 6
  • 30
  • 38
28
votes
4 answers

Android: After creating a new notification, the older one is replaced

I want to create a notification without canceling/deleting previous notifications from my app. Here is my code for creating a notification: private void notification(Context context, String title, String content) { NotificationCompat.Builder…
M.Veli
  • 519
  • 1
  • 6
  • 15
28
votes
3 answers

How can I avoid blinking notification update while changing button

I have a Notification, which supports play,pause forward and back. private static Notification createNotification(String interpret, String title, boolean paused) { // if (builder == null) builder = new NotificationCompat.Builder(context); …
Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136
28
votes
5 answers

Do Local Notifications need user permission on iOS?

I am using UILocalNotification in my app to schedule notifications. The notifications work fine and show up when I want them to. I dont have an issue with that. I am NOT doing any remote/push notifications. What got me wondering is that I never saw…
RPM
  • 3,426
  • 2
  • 27
  • 35