• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help For a particular Push Notification, not displaying latest notification on page

  • Thread starter Thread starter Android Question
  • Start date Start date
A

Android Question

Guest
Can any body help me.

When received a push notification, on clicking it gets redirect to particular page but on that pageN it is not displaying latest notification

I am not getting what I ma doing wrong here
Code :
Intent notificationIntent = new Intent (context, ActBuzzDetails.class);
notificationIntent.putExtra("BuzzId", objNotification.getRelatedBuzzId());
notificationIntent.putExtra("IsNotification", true);

notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |Intent.FLAG_ACTIVITY_SINGLE_TOP);


PendingIntent intent =
PendingIntent.getActivity(context, 0, notificationIntent, 0);

notification.setLatestEventInfo(context, title, message, intent);
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notification.defaults |= Notification.DEFAULT_SOUND;

// Vibrate if vibrate is enabled
notification.defaults |= Notification.DEFAULT_VIBRATE;
int uniqueNumber=Integer.parseInt( objNotification.getNotificationId());
notificationManager.notify(uniqueNumber, notification);


to reteive the values i another acitivity :

buzzId = getIntent().getStringExtra("BuzzId");
isNotification= getIntent().getBooleanExtra("IsNotification", true);


in buzzId I m getting previous values and not latest notification.
 
Back
Top Bottom