Android: Managing Multiple Notifications
I am trying to create multiple notifications in my application. To identify each notification uniquely, i have given them an unique identificationId. Following is my code: private
Solution 1:
I got the answer. The intents were getting cached in. To, make a new intent, just add the following piece of code:
saveCallIntent.setData((Uri.parse("custom://"+System.currentTimeMillis())));
This makes the intent unique.
Also, someone suggested me the following piece of code to make the intent unique:
saveCallIntent.setAction("actionstring" + System.currentTimeMillis());
It didnt help me, but might be of help to someone else.
--Chander
Solution 2:
just place the notificationId
instead of 0 in pendingIntent
.
PendingIntent.getActivity(this, notificationId, intent,PendingIntent.FLAG_UPDATE_CURRENT));
The user must also update the following code together with the above one to get it working.
mNotificationManager.notify(notificationId, mBuilder.build());
Post a Comment for "Android: Managing Multiple Notifications"