【问题标题】:Stack notification in parse解析中的堆栈通知
【发布时间】:2015-01-06 21:16:11
【问题描述】:

如何在 parse android 中进行堆栈通知? 我为设备发送推送消息,例如:

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

例如,如果我发送两个通知,那么电话栏中会出现两个图标。我只想有 1 个图标。

【问题讨论】:

  • 堆罗恩是什么意思?增量?
  • 我的意思是当我发送2个推送时,在电话栏中出现2个图标通知,对吧?我只想要发送的所有消息的 1 个图标。

标签: parse-platform notifications push-notification parse-android-sdk


【解决方案1】:

你尝试过以下方式吗?

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();

使用 about 代码,您需要为多个通知设置相同的对象。

【讨论】:

  • 增量在 Android 中不起作用。您需要使用自定义 Receiver 类在客户端处理它。不幸的是,我自己无法弄清楚这一点:(
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-08-20
  • 2015-11-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多