android - GCM Notifications in my app overlaps the older and displays the newest one. -


hi friends have created android project using gcm messaging. able send , receive notifications perfectly. problem arises when ever send more 1 notification. second notification overlaps first one. precise - suppose have sent 3 notifications in day, , meanwhile user of app offline comes online receive notifications able see last one. notification tone playing 3 times last notification visible. instead see 3 notifications 1 after other. how resolve problem please me. thank in advance.

may looking this: notification inbox style gets updated when notification comes

you need use inboxstyle achieve this.

 notification noti = new notification.builder()      .setcontenttitle("5 new mails " + sender.tostring())      .setcontenttext(subject)      .setsmallicon(r.drawable.new_mail)      .setlargeicon(abitmap)      .setstyle(new notification.inboxstyle()          .addline(str1)          .addline(str2)          .setcontenttitle("")          .setsummarytext("+3 more"))      .build(); 

this right official website http://developer.android.com/reference/android/support/v4/app/notificationcompat.inboxstyle.html

and entire tutorial https://priyankacool10.wordpress.com/2014/04/27/how-to-create-notifications-in-android/

if answer serves purpose don't forget accept answer :)


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -