Questions tagged [heads-up-notifications]

High-priority notifications introduced in Android 5.0

Heads-up notifications were introduced in Android 5.0. These notifications are high-priority notifications and are presented to users for a short period of time with an expanded layout exposing possible actions.

After this period of time, the notification retreats to the notification shade. If a notification's priority is flagged as High, Max, or full-screen, it gets a heads-up notification.

Good examples of heads-up notifications:

  • Incoming phone call when using a device
  • Alarm when using a device
  • New SMS message
  • Low battery
52 questions
4
votes
1 answer

Heads up Notification not working as expected

I have Implemented heads up notification for my app. Code is like this: private String CHANNEL_ID = "message_notifications"; NotificationChannel mChannel = new NotificationChannel(CHANNEL_ID,"message_notifications",…
Rehan
  • 454
  • 7
  • 19
4
votes
1 answer

MIUI heads up notification not working

I'm struggling to get my notifications to display heads up or peek as it is also called. It is working fine with stock Android and Lineage OS API 21-26 What needs to be done to get it to work in MIUI 8? The app has ALL notification permissions…
4
votes
1 answer

Heads Up Notification getting dismissed after few second

I am trying to make a heads up notification through the code below and want it to to be persistent until the user decide to dismiss it. But it is getting dismissed automatically after few second (around 10 sec). Is there any way to make it…
4
votes
1 answer

Dismiss Heads Up notification and create a normal one

I'm using this code to create a Heads Up notification. private static void showNotificationNew(final Context context,final String title,final String message,final Intent intent, final int notificationId, final boolean isHeaderNotification) { …
leonvian
  • 4,719
  • 2
  • 26
  • 31
4
votes
2 answers

Notification without "heads up"

I am trying to create a notification that has a high priority (a chatting app) but my client requested that there will be no "heads up" view for it. I have tried creating an empty layout for a RemoteViews to set as the…
thepoosh
  • 12,497
  • 15
  • 73
  • 132
4
votes
0 answers

Heads-up Notification - which side to swipe

I've noticed that apps that use heads-up notifications may have different behaviors. I always swipe my WhatsApp notifications to the left, but my custom SMS app (Textra) notifications must be swiped to the right instead. I've looked at the…
Teo Inke
  • 5,928
  • 4
  • 38
  • 37
3
votes
1 answer

Show Heads-up notification when app is background

I want to appear Heads Up Notification When My android app is background. When my app is open, Heads Up Notification appears but if the app is background or closed, it just showing on the normal status bar. I tried on many other resources and read…
3
votes
2 answers

Android O heads up notifications

I've been rewriting my code to match Android O notification changes and heads up notifications stopped working. I target SDK version 26 and below is my code. Please help me get heads up notifications working. Any help is appreciated. public…
3
votes
2 answers

PushSharp Google Cloud Messaging Heads-up notification

I'm developing an application for Android and iOS and I'm using PushSharp (on server-side) to send push notifications to both platform. In particular I'm using (for Android) the Firebase platform (FCM). Following this guide I was able to send push…
3
votes
1 answer

Is it possible to create a Notification which doesn't generate Heads up Notification, but will appear in lock-screen

I am currently in a project which develops a DECT-based android system based on Android 5.0.1, and need to add a mode which will bring up the Dialer App while the InCallUi App is running (when there is an incoming call). When the Dialer App is in…
Ken Tsoi
  • 1,195
  • 1
  • 17
  • 37
3
votes
2 answers

Heads up notification do not work sometimes

I make a head up notification this way: Notification.Builder nb = new Notification.Builder(context) .setSmallIcon(icon) .setContentTitle("Title") .setContentText("Content") .setDeleteIntent(delete) …
aikrikunov95
  • 307
  • 4
  • 13
2
votes
0 answers

How to detect if heads-up notification is switched off in Marshmallow

From API 23, you can toggle the "Allow peeking" switch to the Off position—to no longer receive heads-up notifications for that app. Settings > Apps > "Select App" > Notifications. Is there a way to detect this in code?
1
vote
1 answer

Progressive web app (PWA) not able to make push notifications pop up on screen of android phone

Working on a PWA (Progressive web app) that needs to create push notifications which are needed to be seen as obvious as possible. Like most chat apps, i'd like the notification to pop up on the mobile screen. On Android 9 and 10 (not tested other…
1
vote
0 answers

How to avoid image crop in BigPictureStyle notification

I am using BigPictureStyle for showing image. But top and bottom part of the image is cropped. How can I avoid cropping image. Is there any other way to achieve this. Also I dont want to use custom views for that.
Sandhiya
  • 339
  • 2
  • 14
1
vote
2 answers

Starting Activity from Service

There is restriction in launching activities from background in Android 10. I am working on Voip calling app. So due to this restriction I have started Activity from Service through pending intent. Whenever user clicks answer in Heads up…
Sandhiya
  • 339
  • 2
  • 14