android-notification-bar

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

老子叫甜甜 提交于 2019-12-01 15:38:51
问题 This question already has answers here : Android 4.1: How to check notifications are disabled for the application? (5 answers) Closed 2 years ago . Is there any way to track whether the user has "Show notifications" disabled/unchecked in the Settings/App Info page of my app? 回答1: 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

Android Multiple Notification sending same data on clicking

半腔热情 提交于 2019-12-01 15:31:39
问题 Notification in android taking same intent on clicking. I am sending notifications after installing the theme. Consider I install 4 themes and 4 notifications appear in Notification window, but when I click on each notification it will launch perticular activity but the intent is having the same data for each intent. my code goes like this @SuppressWarnings("deprecation") void sendInstalledNotification(String fileName, String packageName) { NotificationManager notificationManager =

How to close any activity of my application by clicking on a notification?

那年仲夏 提交于 2019-12-01 09:27:27
问题 When I click on a notification apply the following: intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); In all "startActivity" of the app I applied the next flag: intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); The startActivity my notification does the following: Call activity "Splash" and is called "Main". Casulidad If I was in "Main" pulse notification, closes the current (working properly). But if I am in

How to animate the progress notification icon

余生长醉 提交于 2019-11-30 22:00:46
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 NotificationCompat.Builder(DownloadService.this) .setSmallIcon(R.drawable.download) .setContentTitle("MayUp") .setContentText("Downloading new tools") .setTicker("Downloading in progress"); mBuilder.setAutoCancel(true); Intent targetIntent = new Intent(DownloadService.this, ListClass.class); TaskStackBuilder stackBuilder = TaskStackBuilder.create(DownloadService.this); // Adds the back stack for the

How to animate the progress notification icon

ぐ巨炮叔叔 提交于 2019-11-30 17:41:49
问题 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 NotificationCompat.Builder(DownloadService.this) .setSmallIcon(R.drawable.download) .setContentTitle("MayUp") .setContentText("Downloading new tools") .setTicker("Downloading in progress"); mBuilder.setAutoCancel(true); Intent targetIntent = new Intent(DownloadService.this, ListClass.class);

Android notification bar open last active activity?

喜欢而已 提交于 2019-11-30 15:29:48
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 activity) and now I need to go to back to my previously started timer activity by clicking on notification icon ??? When I click I am starting a new instance timer activity , not the previously started timer activity ! , and if I then click back button it show me a previously timer activity .. Question is: How to call previously started activity trough

Bluetooth pairing request on notification bar?

泄露秘密 提交于 2019-11-30 12:11:15
问题 Hey everyone! Started programming with Bluetooth on Android awhile ago. But now I've run into some issues. I'm wondering why the pairing request sometimes shows up in the notification bar and sometimes this is skipped and the dialog is shown directly. For example: I initiate my pairing request from an embedded device and then there's a notification such as this one: And sometimes I don't have to bother with the notification, my dialog just shows up as I intended it to be. Is there way to

How to count number of notification and display single icon in Android?

妖精的绣舞 提交于 2019-11-30 09:11:44
I have multiple Android notification, but when I send a message from my web server, the android device creates a new notification icon on status bar. I want to count the number of unread notification, display it on statusbar with single icon, and when a notification is read, the notification has to change the number of unread notification count. How can I do it? It's look like "3 Others" in this image: Notification Icon Mortimer Check out the answer here: How to give counter if more than one Notifications are there You just have to set Notification.number : Notification notification = new

putExtra using pending intent not working

会有一股神秘感。 提交于 2019-11-30 08:06:31
I have written a code in my GCMIntentservice that sends push notifications to many users. I use the NotificationManager that will call DescriptionActivity class when the notification is clicked. I also send the event_id form the GCMIntentService to the DescriptionActivity protected void onMessage(Context ctx, Intent intent) { message = intent.getStringExtra("message"); String tempmsg=message; if(message.contains("You")) { String temparray[]=tempmsg.split("="); event_id=temparray[1]; } nm= (NotificationManager)getSystemService(NOTIFICATION_SERVICE); intent = new Intent(this, DescriptionActivity

Bluetooth pairing request on notification bar?

孤街醉人 提交于 2019-11-30 02:08:15
Hey everyone! Started programming with Bluetooth on Android awhile ago. But now I've run into some issues. I'm wondering why the pairing request sometimes shows up in the notification bar and sometimes this is skipped and the dialog is shown directly. For example: I initiate my pairing request from an embedded device and then there's a notification such as this one: And sometimes I don't have to bother with the notification, my dialog just shows up as I intended it to be. Is there way to catch that notification and display the dialog or is this a bug in my code when I initiate bluetooth