android-notification-bar

how to disable notification bar for an android application? [duplicate]

北慕城南 提交于 2019-12-04 05:32:49
问题 This question already has answers here : Hide Notification bar (8 answers) Closed 6 years ago . I have an android application which lists installed applications and launch them on item click.I want to disable accessing NotificationBar from my application.ie,When user launch 'Browser' application from my application,it is possible to drag down the notification bar and he/she can change settings of gps,wifi etc...I tried this requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags

How to keep track of notifications to know when to show a summary notification

一笑奈何 提交于 2019-12-04 03:48:23
I want to emulate Gmail's app behavior regarding notification bar notifications, which complies with the recommended Android pattern: http://developer.android.com/design/patterns/notifications.html When the app is in background and I get a new e-mail I get a notification in the notification bar like this: Line 1 : Jane Smith Line 2 : Hi John, this is a sample message... That is, a notification that is specific for a single message, and tapping it leads to a screen showing that specific e-mail. If I clear the notification either by swiping it or with "Clear all", then when I get a new message I

Notification Bar is grey after implementing Nav Drawer

好久不见. 提交于 2019-12-03 13:03:00
I am trying to learn implementations of Navigation Drawer in Android. In one activity, i have made the Navigation Drawer come under the Status Bar(transparent) and over the App Bar and everything works fine.(left Screenshot) In another activity in the same App, i am trying to create Navigation Drawer that pulls up under the App Bar. But here, the status bar turns grey for some reason(whether nav drawer is open or closed)(Right Screenshot). Other than this, everything seems fine. Below is the screenshot: The green Nav Drawer is a fragment. What i want to know is how to make the status normal

Android: Manage multiple push notification in device of an app

会有一股神秘感。 提交于 2019-12-03 11:53:16
问题 I am developing an application in which i implemented Push notification functionality. My code of onMessage - GCMIntentService.java is: @Override protected void onMessage(Context context, Intent data) { String message = data.getExtras().getString("message"); displayMessage(context, message); generateNotification(context, message); } And code of generateNotification - private static void generateNotification(Context context, String message) { int icon = R.drawable.ic_launcher; long when =

Android: Manage multiple push notification in device of an app

让人想犯罪 __ 提交于 2019-12-03 03:17:30
I am developing an application in which i implemented Push notification functionality. My code of onMessage - GCMIntentService.java is: @Override protected void onMessage(Context context, Intent data) { String message = data.getExtras().getString("message"); displayMessage(context, message); generateNotification(context, message); } And code of generateNotification - private static void generateNotification(Context context, String message) { int icon = R.drawable.ic_launcher; long when = System.currentTimeMillis(); NotificationManager notificationManager = (NotificationManager) context

How to load Glide cached image in NotificationCompat.Builder.setLargeIcon()?

半城伤御伤魂 提交于 2019-12-01 20:03:10
Like this image I am trying to set notification large icon as user profile thumbnail like whatsapp or other chatting apps I have tried Glide.with(context) .asBitmap() .load(messageNotification.getLargeIcon()) .into(new SimpleTarget<Bitmap>() { @Override public void onResourceReady(Bitmap resource, Transition<? super Bitmap> transition) { builder.setLargeIcon(resource); } }); but it is not working.. Any Help? Santanu Sur If you set the large icon using glide..the you should also notify the NotificationManager onResourceReady(resource, transition) .into(new SimpleTarget<Bitmap>() { @Override

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

此生再无相见时 提交于 2019-12-01 19:34:16
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) getSystemService(NOTIFICATION_SERVICE); Notification note = new Notification(R.drawable.image,"status message", System.currentTimeMillis()); Intent in = new Intent(Notify.this,CommentU.class); PendingIntent pi = PendingIntent.getActivity(Notify.this, 0, in, 0); note.setLatestEventInfo(Notify.this,"NotificationTitle", "You have a new Commentio", pi); note.number = +

Android NotificationListenerService onNotificationPosted fire twice

无人久伴 提交于 2019-12-01 18:03:51
I listen for notifications like WhatsApp Messages. But every time a notification comes in the NotificationListenerService fire twice. Does anyone know this problem?? This is a snippet from the AndroidManifest.xml: <service android:name=".NotifyService" android:label="WhatsNotify" android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"> <intent-filter> <action android:name="android.service.notification.NotificationListenerService"></action> </intent-filter> </service> And inside the NotificationListenerService class: public class NotifyService extends

How to know if Show Notification is disabled for my app? [duplicate]

橙三吉。 提交于 2019-12-01 16:39:54
This question already has an answer here: Android 4.1: How to check notifications are disabled for the application? 5 answers Is there any way to track whether the user has "Show notifications" disabled/unchecked in the Settings/App Info page of my app? josedlujan Simple: You cant. In Google I/O 2012 answered: https://www.youtube.com/watch?v=Yc8YrVc47TI&feature=player_detailpage#t=1682s update: you can check if the user can see the notification in the status bar i.e. able TO CHECK (in the code) IF THE NOTIFICATION IS VISIBLE TO THE USER where android version >= 4.3. http://developer.android

Android NotificationListenerService onNotificationPosted fire twice

六月ゝ 毕业季﹏ 提交于 2019-12-01 16:15:35
问题 I listen for notifications like WhatsApp Messages. But every time a notification comes in the NotificationListenerService fire twice. Does anyone know this problem?? This is a snippet from the AndroidManifest.xml: <service android:name=".NotifyService" android:label="WhatsNotify" android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"> <intent-filter> <action android:name="android.service.notification.NotificationListenerService"></action> </intent-filter> </service> And