public override void OnTokenRefresh() { var refreshedToken = FirebaseInstanceId.Instance.Token; SendRegistrationToServer(refreshedToken); ChatClientFactory.GetChatClient().SetFirebaseToken(refreshedToken); }
void SendRegistrationToServer(string token) { hub = new NotificationHub(Constants.NotificationHubName, Constants.ListenConnectionString, this); var tags = new List <string>() { "android" }; var regID = hub.Register(token, tags.ToArray()).RegistrationId; ChatClientFactory.GetChatClient().SetNotificationRegistrationId(regID); }