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
6
votes
1 answer

Android: How do I access an AsyncTask from a PendingIntent created by a status bar notification?

My application starts an AsyncTask which downloads a file from a URL. At the same time it creates a status bar Notification which tells the user the percentage complete of the download. I'm trying to make my application respond to clicking the…
5
votes
2 answers

Default notification background color

I have a custom notification that uses a LinearLayout that contains an ImageView and a TextView. Before Android 4.0 all I needed to do was swap out the text colors with the EventContent and EventContent.Title styles and all the colors looked…
5
votes
2 answers

How can i open Activity when notification click

I need use notification with click event, i have notification method but this method don't open my activity. My code: private void sendNotification(String msg) { NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) …
5
votes
2 answers

Android notification bar open last active activity?

I am creating like timer application and when I start timer I have option to go to android Home or start any other activity . When I start timer I set a notification bar icon and if i use some other application (mean go from started timer…
Nezir
  • 6,727
  • 12
  • 54
  • 78
5
votes
2 answers

Is it possible to reduce notification time showing in Android?

I am using bellow code to show a notification on my Android phone. I want to reduce the time which uses to shows the notification. Now, it spends about 2 seconds for showing, then it is hidden. I want to reduce the time from 2 seconds to 1 second.…
Jame
  • 3,746
  • 6
  • 52
  • 101
5
votes
2 answers

How to add a Dynamic image instead of notification icon in android?

I used below code for displaying notification in notification Bar. it worked fine. But i need to display notification icon dynamically that will come from web service. How i can do? NotificationManager nm = (NotificationManager)…
user2159475
  • 76
  • 1
  • 3
4
votes
0 answers

Android 11 device Not showing badge count

I am showing an android app to show the badge count on the app launcher icon. Tried in a different version but it's not working on Android 11. May I know, is there anything new API for the same on android 11? Code I used is given below : …
4
votes
0 answers

Notification keeps expanding state by default

Is it possible to keep expand state by default for setCustomBigContentView? It gets collapsed by default when I use setCustomBigContentView method even the size lower than default notification height. RemoteViews contentView = new…
4
votes
2 answers

android spinner is showing hidden notification bar

In my app i make the app fullscreen. Means android title bar and notification bar is hidden here. But when i click on the spinner the hidden notification bar gets visible for fraction of seconds. It is not happening with all the spinners in my app.…
Debarati
  • 3,296
  • 2
  • 18
  • 30
4
votes
1 answer

How to remove the android notifications bar?

I know that adding android:theme="@android:style/Theme.NoTitleBar" to the manifest removes the title, but what do I do to remove the notifications bar?
AnimatedRNG
  • 1,859
  • 3
  • 26
  • 39
4
votes
1 answer

Show Notification data when "Hide sensitive information" is active

In Android, if a user has lock screen and has selected hide sensitive information option, the notification's description shows as "content-hidden" while the screen is locked. I understand that this is how the feature is designed but is there a way…
4
votes
3 answers

How to animate the progress notification icon

I am building the notification progress bar in Service in such a way that is given below : private NotificationManager mNotifyManager; private NotificationCompat.Builder mBuilder; mBuilder = new…
4
votes
1 answer

Notifications will be overwritten each other

I send different notifications. But when you click on any one of them I get the data that have been sent to the last notification. how to fix it? I need to notice every store their data, and a new notice does not replace them.I use a flag …
4
votes
1 answer

Why FLAG_KEEP_SCREEN_ON doesn't work properly?

I am trying to make the screen to be always on while my test app is in the foreground with Ongoing Notification running. It works fine when the app is on resume state, but it doesn't work when I hit the home/middle button to put the app on pause…
4
votes
1 answer

Android show icon in Status bar

I want to show my App Icon in status bar without notification tray/drawer. just like alarm icon shows. I am also making application similar to alarm clock. I have dig out few questions on stackoverflow, some say it is not possible without…
Haris
  • 1,822
  • 2
  • 22
  • 44