public void OnNewToken(string token) { Debug.Log($"[HMS] Push token from OnNewToken is {token}"); if (token != null) { OnTokenSuccess?.Invoke(token); } }
// Start is called before the first frame update void Start() { PushManager.Listener = this; var token = PushManager.Token; Debug.Log($"[HMS] Push token from GetToken is {token}"); if (token != null) { OnTokenSuccess?.Invoke(token); } }
void Start() { PushManager.Listener = this; notificationDataOnStart = PushManager.NotificationDataOnStart; if (notificationDataOnStart.NotifyId != -1) { NotificationMessageOnStart?.Invoke(notificationDataOnStart); } PushManager.RegisterOnNotificationMessage((data) => { OnNotificationMessage?.Invoke(data); }); var token = PushManager.Token; Debug.Log($"[HMS] Push token from GetToken is {token}"); if (token != null) { OnTokenSuccess?.Invoke(token); } }