bindTag function
Future<CommonCallbackResult>
bindTag({
- @required CloudPushServiceTarget? target,
- List<
String> ? tags, - String? alias,
Android 文档 绑定标签到指定目标; 支持向设备、账号和别名绑定标签,绑定类型由参数target指定; 绑定标签在10分钟内生效; App最多支持绑定1万个标签,单个标签最大支持128字符。 target 目标类型,1:本设备; 2:本设备绑定账号; 3:别名 target(V2.3.5及以上版本) 目标类型,CloudPushService.DEVICE_TARGET:本设备; CloudPushService.ACCOUNT_TARGET:本账号; CloudPushService.ALIAS_TARGET:别名 tags 标签(数组输入) alias 别名(仅当target = 3时生效) callback 回调
Implementation
Future<CommonCallbackResult> bindTag(
{@required CloudPushServiceTarget? target,
List<String>? tags,
String? alias}) async {
var result = await _channel.invokeMethod("bindTag", {
"target": target!.index + 1,
"tags": tags ?? <String>[],
"alias": alias
});
return CommonCallbackResult(
isSuccessful: result["isSuccessful"],
response: result["response"],
errorCode: result["errorCode"],
errorMessage: result["errorMessage"],
iosError: result["iosError"]);
}