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

4666 questions
1
vote
1 answer

Android Repeated Notifications not working When App is Closed

I want to send notification everyday on a particular time. The code is working when the app is opened. But when it closed and remove, the notifications are not showing. I have used broadcast receiver and service to this. The code is given below. Can…
1
vote
0 answers

Android: play custom notification sound, even if phone is muted and/or in DND mode

I've created a personal (not public!) application long ago which receives notifications. Now I'm rewriting this application and I'm using notification channels. I already implemented a custom vibration pattern and all the things I need, but one…
webmonkey
  • 1,045
  • 14
  • 28
1
vote
1 answer

Opening Android app using notification & getLaunchIntentForPackage doesn't go through LauncherActivity

I am using Firebase (FCM) to show Push Notifications to the user and I am running into a weird problem. The code I have works for the following scenarios (using FirebaseMessagingService): App in foreground - Receiving data in onReceive() and…
1
vote
2 answers

Prevent recreating alive activity when launching from notification

From Android Oreo 8.0 (26 API) when using code for launching activity, it won't create a new activity if previous instance wasn't destroyed and still alive, but on previous Android (e.g. Marshmallow, Nougat) it always creates a new activity in any…
1
vote
0 answers

android Firebase Cloud Messages notification icon

I use FCM in my project and it works pretty well. But there is one issue: on some Android devices instead of coloured application icon (when no custom default icon is set and no icon is set in the notification payload) round gray circle is shown.…
1
vote
1 answer

FCM Service gets killed after i swipe my app from multi task tray

I have an app that triggers incoming calls by FCM data message(priority: high, no notification payload). When the app is in the foreground or background, the app receives calls. For the above case, the notification(Incoming Call) is received when in…
1
vote
0 answers

How do I do fullScreenIntent from FirebaseMessagingService

I'm trying to show a full-screen activity on the lock screen when the app recieves a firebase cloud message. Currently the code looks like this: private void showFullScreenIntent(RemoteMessage remoteMessage, String ticketNumber) { try { …
Joshua Augustinus
  • 532
  • 1
  • 5
  • 13
1
vote
1 answer

ExoPlayer Notification Manager, hide seekbar from notification

I want to hide seekbar view from notification. I tried different solutions(disable chronometer), but it did not work. I use this code block for disable seek action: mediaSessionConnector.setEnabledPlaybackActions(PlaybackStateCompat.ACTION_PLAY or …
msevgi
  • 4,479
  • 2
  • 20
  • 29
1
vote
0 answers

Flutter: How to a schedule a notification that replaces the last scheduled notification

i am developing an app in which all notifications are schedule in advance. Each notification is set to a different time of the day and should replace the previous notification. I.e 9.00 AM, 1.00 PM, 5.00 PM, Etc I am using the package…
Lachlan
  • 125
  • 1
  • 7
1
vote
0 answers

Send Daily Notification at a scheduled time android

I am trying to send notification daily at 10am. The code works fine when app is running and in background, but it does not work when the app is terminated/Killed. Here is what I am doing, In Manifest:
1
vote
1 answer

How to navigate to a fragment from Notification? Android Kotlin

On getting notification i wanted to open my application and navigate to Details fragment since i am using Navigation Component from jetpack, but i dont know how to implement it? here is my notification service code val intent = Intent(this,…
1
vote
0 answers

Android notification with Serializable payload

I have an Android app with a single activity and use FCM for messaging. In an onMessageReceived I prepare a PendingIntent to start the activity: val intent = Intent(this, MainActivity::class.java) intent.putExtra(KEY,…
1
vote
1 answer

After notification, I would like to exit and go back to main screen?

I am testing out android notifications for the first time. I am on a page with a list of contacts and I click one to trigger my notification. The notification lands me on a page with these buttons snooze quick text I click snooze, then I click…
Dean Hiller
  • 17,183
  • 19
  • 103
  • 176
1
vote
1 answer

Getting a failed to post notification on channel "channel_id_here" error

I have been struggling for days now to get local notifications to display on an Android device. Notifications simply do not show up and I'm getting a developer warning: package Failed to post notification on channel "channel_id_here" error. I went…
1
vote
0 answers

Notification from startForeground inside service does not show sometimes

I have some users intermittently reporting that a notification for an incoming phone call isn't being shown. One time it is, another it isn't. One of them is on 8.1, and the other on 9. It mostly works for them, but sometimes it simply does not…
Ben987654
  • 2,534
  • 2
  • 21
  • 41
1 2 3
99
100