registerForPushNotifications method

Future<void> registerForPushNotifications(
  1. String pushToken
)

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:

Implementation

Future<void> registerForPushNotifications(String pushToken) async {
  try {
    await _channel.invokeMethod(
      'Client.registerForPushNotifications',
      pushToken,
    );
  } on PlatformException catch (e) {
    throw VIException(e.code, e.message);
  }
}