钛安卓结合推送通知



我正在开发一个具有推送通知的android应用程序。我正在使用钛云推送模块来接收推送通知。问题是我无法组合/分组通知。每个通知都保持独立。如果有两个通知,我想合并。这是我的收货代码

CloudPush.addEventListener('callback', function(evt) {
        if (evt.payload != null) {
        var data = JSON.parse(evt.payload);
}

});

我用过

<property name="acs-grouped-notification-message-" type="string">You have $number$ unread notifications!</property> in tiapp.xml

但不使用

提前谢谢。

正常分组通知

要将Android通知分组在一起,您需要编辑tiapp.xml以获得以下内容:

<property name="acs-grouped-notification-message-development" type="string">You have $number$ unread messages.</property>
<property name="acs-grouped-notification-message-production" type="string">You have $number$ unread messages.</property>
-or-
<property name="acs-grouped-notification-message" type="string">You have $number$ unread messages.</property>

你的房产名称有一个拼写错误:你有:

acs-grouped-notification-message-

删除尾部的破折号,清理并重新生成应用程序,您应该会发现它将通知分组。

国际化和多语言分组通知

如果你的应用程序要在资源部分下的i18n文件夹中提供多语言通知,你可以添加语言字符串:

acs_grouped_notification_message

使用您想要的用户首选语言的任何消息。

最新更新