Device Token for Push Notification

北慕城南 提交于 2019-12-07 09:20:17

问题


I am implementing a push notification service. I would need to create a database to store all the device tokens from the 4 mobile platforms. I want to organize them accordingly to their platforms(iOS,Android,BlackBerry,WP7). But what are the ways to differentiate the platforms so that if I want to send a message to only Android users, the other platforms will not receive it.

I am using ManicNetwork but unfortunately, the software does not help to differentiate the platforms.

Apple is using a 64bytess hexadecimal string in their token. But how about the other 3 platforms?


回答1:


You could try saving the tokens in different tables. For example, Apple in one, Android in the other.

Or like what marimaf said, add another attribute to be sent to the server. For example,

Apple - App

Android - And

BlackBerry - BB




回答2:


Try adding another attribute when you register the device id on your server that indicates the devices OS. Then you can filter by this attribute and get the OS you want.



来源:https://stackoverflow.com/questions/8161753/device-token-for-push-notification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!