Questions tagged [android-notification-bar]

Use this tag for questions relating to issues showing your notification in the notification area.

When you tell the system to issue a notification, it first appears as an icon in the notification area. To see the details of the notification, the user opens the notification drawer. Both the notification area and the notification drawer are system-controlled areas that the user can view at any time.

Useful links

359 questions
2
votes
2 answers

How to pin notification always on the top of notification bar

I am trying to fix four buttons always at the top of notification bar that cannot be closed. The buttons will be fixed all the time when the application is launched for the first time. For this purpose I am creating notification through Notification…
2
votes
0 answers

How can i implement a view UX like notification bar closing animation?

If you take a look at notification bar, when closing it, the views go under each other and then finally go out of the screen. take a look at screenshots to see what i mean: I want to implement a view in my application that behave just like this.…
Morteza Rastgoo
  • 6,772
  • 7
  • 40
  • 61
2
votes
2 answers

How to restore previous activity by clicking on notification

When my notification goes off I want to restore the activity that was put into the background, not start a new activity. I've seen some answers about using FLAGS but I don't know how to implement…
2
votes
2 answers

Android notification with custom xml layout not showing

I want my notification to ellipsize the text if it's too long, so I created a custom layout for it:
hubert
  • 923
  • 2
  • 9
  • 18
2
votes
1 answer

How to get notification icon of other app?

I'm using NotificationListenerService for catching notification, with the help of kpbird blog. But I'm unable to extract the icon's drawable. I'm also going through this, but things are not cleared to me. Please help.
PPB
  • 151
  • 1
  • 14
2
votes
1 answer

Android Notification not shown

I wrote an IntentService for GCM Push Notifications. I receive the Messages but something's wrong with displaying my Notification to the user. Here's my Code: import com.google.android.gms.gcm.GoogleCloudMessaging; import…
2
votes
1 answer

Create own NotificationStyle

In my Android application I want to create a expendable notification. For this I have to set a Style for the notification like this: NotificationCompat.Builder builder = new…
Cilenco
  • 6,951
  • 17
  • 72
  • 152
2
votes
1 answer

How to hide home, back, appswitcher buttons and notification bar?

Few words for background: Application will be used in exhibition. It should hide home, back, appswitcher buttons and notification bar to prevent user to go settings etc. Device: Samsung GT-N8000 Android 4.1.2 I have tried to hide them by…
Joe Rakhimov
  • 4,713
  • 9
  • 51
  • 109
2
votes
3 answers

FLAG_ACTIVITY_CLEAR_TOP not working from Notification Section

I've got a simple use case. I have activity open like below: A > B > C Now, I get a push notification. I do the following in my GCMIntentService class: In onMessage, Intent notificationIntent = new Intent(context, A.class); PendingIntent…
2
votes
1 answer

Background for notification icons

I am trying to figure out why different icons in the notification area have different backgrounds. Please see attached screenshot. 'USB debugging conencted' has a solid color background, but other two notification icons don't have the same greenish…
2
votes
2 answers

How long can a notification be kept for (permanently)?

I have a service with startForeground(requestCode, notification); and have it set so that setOngoing(true) so the user cannot remove notification. How long does this notification stay alive for? Will it stay alive forever (until user restarts…
2
votes
1 answer

how to handle push notification in android app active and inactive state

hi how to handle push notification click i need to open activity with specific fragment , i have two states like app is closed and app is opened , when the app is closed i need to open home activity with MyFragment.class , if app is opned then i…
2
votes
1 answer

Android notifications different icon for status bar and notification body

I have a notification of battery level. I want to make different icon in status bar and notifications center. In status bar: number (2 digits). In body: my app icon. How can I do that? The app icon is also in the status bar, how can I change that?
2
votes
2 answers

Hiding status bar notification icon for foreground service after raising PRIORITY_MAX notification

First, do this (tested on Nexus 5 running 4.4.2): Pass a PRIORITY_LOW notification to Service.startForeground(). Observe notification is not shown in status bar. Raise a PRIORITY_MAX notification using same notification ID. Observe notification is…
Mark
  • 7,446
  • 5
  • 55
  • 75
2
votes
1 answer

Cover full height of notification using custom layout in Android

I am trying to create custom notification in my android application. I am using following code Custom layout
Ashwani K
  • 7,880
  • 19
  • 63
  • 102