notificationmanager

Android - notification manager, having a notification without an intent

半世苍凉 提交于 2019-11-26 16:12:15
问题 I would like to be able to fire a notification to alert the users about a timer that has finished, however i do not wish to have an intent when you click the notification. I've tried passing in null for the intent String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(ns); int icon = R.drawable.icon; CharSequence tickerText = "Hello"; long when = System.currentTimeMillis(); Notification notification = new

Multiple notifications to the same activity

僤鯓⒐⒋嵵緔 提交于 2019-11-26 12:58:25
问题 I have an activity that is being opened from the notification bar, but when I do NotificationManager.notify(...) , I\'m giving to the intent a different bundle, so that each notification opens the same activity, but obtaining from the DB other information each other. But when I try to enter to any of the notifications (for example there are 3 notifications), they all send me to the activity with the same bundle that the last one. After trying with some Flags, I really don\'t know where is the