3

How can I do stack notifications in parse android? I send the push messages for the device, example:

ParsePush androidPush = new ParsePush();
 androidPush.setMessage("TEST");
 androidPush.sendInBackground();

For example , if I send two notifications then appear two icons in phone bar. I want to have only 1 icon.

Ron
  • 51
  • 4

1 Answers1

0

have you try with following way ?

JSONObject data = new JSONObject("{\"alert\": \"The Mets scored!\",
                                   \"badge\": \"Increment\",
                                   \"sound\": \"cheering.caf\"}");
ParsePush push = new ParsePush();
push.setChannel("Mets");
push.setData(data);
push.sendPushInBackground();

with about code you need to set same object for multiple notifications.

Naitik
  • 796
  • 11
  • 32
  • Increment doesn't work in Android. You need to handle it on the client side using a custom Receiver class. Unfortunately I haven't been able to figure this out myself :( – Martin Erlic Aug 29 '16 at 23:25