[英]Device Token for Push Notification
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. 我需要创建一个数据库来存储来自4个移动平台的所有设备令牌。 I want to organize them accordingly to their platforms(iOS,Android,BlackBerry,WP7). 我想根据他们的平台(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. 但有什么方法可以区分平台,以便如果我只想向Android用户发送消息,其他平台将不会收到它。
I am using ManicNetwork but unfortunately, the software does not help to differentiate the platforms. 我正在使用ManicNetwork但不幸的是,该软件无法区分平台。
Apple is using a 64bytess hexadecimal string in their token. Apple在其令牌中使用64bytess十六进制字符串。 But how about the other 3 platforms? 但其他3个平台怎么样?
Try adding another attribute when you register the device id on your server that indicates the devices OS. 在服务器上注册指示设备操作系统的设备ID时,请尝试添加其他属性。 Then you can filter by this attribute and get the OS you want. 然后,您可以按此属性进行过滤,并获得所需的操作系统。
You could try saving the tokens in different tables. 您可以尝试在不同的表中保存令牌。 For example, Apple in one, Android in the other. 例如,Apple在一个,Android在另一个。
Or like what marimaf said, add another attribute to be sent to the server. 或者像marimaf所说的那样,添加另一个要发送到服务器的属性。 For example, 例如,
Apple - App
Android - And
BlackBerry - BB
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.