[英]Windows Azure notification hub registration ID and token location?
I am using Windows Azure notification hub to send notifications to the users in my Android application. 我正在使用Windows Azure通知中心将通知发送给我的Android应用程序中的用户。 I have some kind of a chat in my application, and I would like to send notifications only to specific users.
我的应用程序中存在某种聊天,我只想向特定用户发送通知。 I suppose that I have to specify their tags when sending notifications.
我想我在发送通知时必须指定他们的标签。 Where are those tags stored?
这些标签存储在哪里? How am I sure that the user is properly registered?
我如何确定用户已正确注册? I have this code for registering users:
我有以下代码用于注册用户:
@SuppressWarnings("unchecked")
private void registerWithNotificationHubs() {
new AsyncTask() {
@Override
protected Object doInBackground(Object... params) {
try {
String regid = gcm.register(SENDER_ID);
hub.register(regid, "tag");
} catch (Exception e) {
return e;
}
return null;
}
}.execute(null, null, null);
}
When not using a tag, the notifications work and they are sent to all the devices. 不使用标签时,通知会起作用,并且通知会发送到所有设备。 I'd like to add a tag and send the notification to specific tag.
我想添加标签并将通知发送到特定标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.