i'm trying show a notification in my app... i declared a sample text as title and body to check whether it is running or not. it was perfect. then, when i changed the String values(title,body). it is not updated, it still shows old sample text. i have searched for solutions on the internet. some said adding a flag_update_current would solve. i did, but no use. here is the code.. i used.
public void Notify(){
Intent intent = new Intent(this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent pi = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
String mbody = "Mode: General";
String title = "messager On";
Notification n = new Notification(R.drawable.ezmsgr,mbody,System.currentTimeMillis());
n.setLatestEventInfo(this, title, mbody, pi);
n.defaults = Notification.DEFAULT_LIGHTS;
n.flags = Notification.FLAG_ONGOING_EVENT;
nm1.notify(NID,n);
}
i tried assinging new values to unique id of notification too. it is not updating.