grayFox16
grayFox16

Reputation: 91

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. 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.

Upvotes: 0

Views: 2010

Answers (1)

efimovandr
efimovandr

Reputation: 1604

We call it tags not tokens. You can specify one ore more tags for each device registration and then use those tags to rout messages to particular user or group. Documentation id here.

Upvotes: 1

Related Questions