in my application, when i click list view item one notification will display, Now when i click that notification open another activity and display the notification content in another activity. Here when i select list view item notification will come with selected item text. After i select another list view item then also notification come with related text, but exact problem is when i open that notification, only one text will display in another activity.please fix it.
rmdListView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
showNotification();
}
Now the notification method is
public void showNotification() {
Uri soundUri = RingtoneManager
.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
// intent triggered, you can add other intent for other actions
Intent intent = new Intent(updateActivity.this,
NotificationReceiver.class);
intent.putExtra("Name", noti);
PendingIntent pIntent = PendingIntent.getActivity(updateActivity.this,
0, intent, 0);
Notification mNotification = new Notification.Builder(this)
.setContentTitle("Reminder!").setContentText(timeList + ":" + noti)
.setSmallIcon(R.drawable.logosmall).setContentIntent(pIntent)
.setSound(soundUri)
.build();
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
mNotification.flags |= Notification.FLAG_AUTO_CANCEL;
notificationManager.notify(0, mNotification);
}