简体   繁体   English

如何在Bluemix中自定义推送通知

[英]How to customize push notifications in Bluemix

I'm trying to configure NodeRED to send notifications to the Android apps on devices of a specific user and people who are registered as his family in the logic. 我正在尝试配置NodeRED以向特定用户的设备上的Android应用程序以及在逻辑中注册为其家人的人发送通知。 I have never dealt with push notifications and I don't know what to look for so steps or even keywords to look up is appreciated. 我从来没有处理推送通知,我不知道该寻找什么,所以步骤甚至是要查找的关键字表示赞赏。

It depends. 这取决于。 Generally you can now see flows of your notification service. 通常,您现在可以看到通知服务的流程。 In the Node-RED flow editor, double-click the notification node to open the Edit function node dialog box. 在Node-RED流编辑器中,双击通知节点以打开“编辑功能节点”对话框。 You should edit the payload object to customize the message notification. 您应编辑有效内容对象以自定义消息通知。

Here there is an example that could be useful for you http://www.ibm.com/developerworks/library/wa-nodered-push-app/ 这里有一个对你有用的例子http://www.ibm.com/developerworks/library/wa-nodered-push-app/

I suggest using tags to group this 'family' of users together. 我建议使用标签将这个“家庭”用户组合在一起。 After creating the tag, you will need some logic on the Android side to identify if the user is part of that family. 创建标记后,您需要Android端的一些逻辑来识别用户是否属于该系列。 If they are, you can subscribe them to the appropriate tag, then you can send a notification to all subscribers of that tag with one REST call. 如果是,您可以将它们订阅到相应的标记,然后您可以通过一个REST调用向该标记的所有订阅者发送通知。 See the Bluemix doc Enabling tag-based notifications for more info. 有关详细信息,请参阅Bluemix doc 启用基于标记的通知

As a general note, you can also send notifications to single users if you have their device ID. 一般说明,如果您有设备ID,也可以向单个用户发送通知。 The device ID is included in the response after registering with the Push Notifications service and should be saved somewhere if you plan on using it for very specific push notifications. 在使用推送通知服务注册后,设备ID包含在响应中,如果您计划将其用于非常特定的推送通知,则应将其保存在某处。 Something to consider, let me know if this helps. 需要考虑的事项,请告诉我这是否有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM