renewToken method
Renews the token when the current token expires.
The token expires after a period of time once the token schema is enabled when:
- The SDK triggers the RtcEngineEventHandler.tokenPrivilegeWillExpire callback
- The RtcEngineEventHandler.connectionStateChanged callback reports the ConnectionChangedReason.TokenExpired error. The app should retrieve a new token from the server and call this method to renew it. Failure to do so results in the SDK disconnecting from the server.
Parameter token
The new token.
Implementation
@override
Future<void> renewToken(String token) {
return _invokeMethod('renewToken', {'token': token});
}