onTokenRefresh

open fun onTokenRefresh(token: String)

Notifies Pushwoosh when Huawei Mobile Services push token is refreshed.

CRITICAL: Call this method from your custom onNewToken callback to forward the new HMS token to Pushwoosh. Without this call, Pushwoosh will NOT be able to send notifications to the device after token refresh. Example:



public void onNewToken(String token) {
    super.onNewToken(token);

    // CRITICAL: Forward token to Pushwoosh
    PushwooshHmsHelper.onTokenRefresh(token);
}

Parameters

token

new Huawei Mobile Services push token (can be null)

See also

HmsMessageService#onNewToken(String)