pushTokenType static method

Future<String?> pushTokenType(
  1. String tokenType
)

Set messaging mode for push notifications Should be call before Countly init

Implementation

static Future<String?> pushTokenType(String tokenType) async {
  if (BUILDING_WITH_PUSH_DISABLED) {
    log('pushTokenType, $_pushDisabledMsg', logLevel: LogLevel.ERROR);
    return _pushDisabledMsg;
  }
  log('Calling "pushTokenType":[$tokenType]');
  if (tokenType.isEmpty) {
    String error = 'pushTokenType, tokenType cannot be empty';
    log(error);
    return 'Error : $error';
  }
  List<String> args = [];
  args.add(tokenType);

  final String? result = await _channel.invokeMethod('pushTokenType', <String, dynamic>{'data': json.encode(args)});

  return result;
}