registerForPushNotifications method
Registers for VoIP push notification with the given token.
Application will receive push notifications from Voximplant Server after first login.
pushToken
- Push notification token.
Throws VIException, if pushToken
is null.
Errors:
- VIClientError.ERROR_INVALID_ARGUMENTS - If
pushToken
is null.
Implementation
Future<void> registerForPushNotifications(String pushToken) async {
try {
await _channel.invokeMethod(
'Client.registerForPushNotifications',
pushToken,
);
} on PlatformException catch (e) {
throw VIException(e.code, e.message);
}
}