Hi
I need to add tags, after the user has logged in. (AD groups as tags)
I know that there are many articles that discuss the same.
This is called when you install the App.
protected override void OnRegistered(Context context, string registrationId)
{
Log.Verbose(MyBroadcastReceiver.TAG, "GCM Registered: " + registrationId);
RegistrationID = registrationId;createNotification("PushHandlerService-GCM Registered...", "The device has been Registered!"); Hub = new NotificationHub(Constants.NotificationHubName, Constants.ListenConnectionString, context); try { Hub.UnregisterAll(registrationId); } catch (Exception ex) { Log.Error(MyBroadcastReceiver.TAG, ex.Message); } //var tags = new List<string>() { "falcons" }; // create tags if you want var tags = new List<string>() {}; try { var hubRegistration = Hub.Register(registrationId, tags.ToArray()); } catch (Exception ex) { Log.Error(MyBroadcastReceiver.TAG, ex.Message); }
}
Of course I've tried to make a small public function that does the same, but the context, causes problems.
So it is possible to update this registration or do anything else.
Best regards Christian Lyck