/// iOS前台收到通知不希望展示时可将withInAppAlert参数置为false
/// android接入厂商通道时,请先参考 [厂商通道接入说明](vendor.md) 配置各厂商通道参数信息后,再调用此注册方法。
void startXg(String accessId, String accessKey, {bool withInAppAlert = true}); void stopXg(); void setEnableDebug(bool enableDebug); /// UNKNOWN 默认类型,当前只支持此类型的推送
/// CUSTOM 自定义
/// IDFA 广告唯一标识,iOS 专用,安卓侧默认为UNKNOWN类型
/// PHONE_NUMBER 手机号码
/// WX_OPEN_ID 微信 OPENID
/// QQ_OPEN_ID QQ OPENID
/// EMAIL 邮箱
/// SINA_WEIBO 新浪微博
/// ALIPAY 支付宝
/// TAOBAO 淘宝
/// DOUBAN 豆瓣
/// BAIDU 百度
/// JINGDONG 京东
/// IMEI 安卓手机标识,安卓专用,iOS默认为UNKNOWN类型
enum AccountType { UNKNOWN, CUSTOM, IDFA, PHONE_NUMBER, WX_OPEN_ID, QQ_OPEN_ID, EMAIL, SINA_WEIBO, ALIPAY, TAOBAO, DOUBAN, FACEBOOK, TWITTER, GOOGLE, BAIDU, JINGDONG, LINKEDIN, IMEI } /// account 账号标识
/// accountType 账号类型枚举
/// note 同一账号类型对应一个唯一账号,覆盖操作,多账号体系请使用不同账号类型
void setAccount(String account, AccountType accountType); /// account 账号标识
/// accountType 账号类型枚举
void deleteAccount(String account, AccountType accountType); void cleanAccounts(); /// tags 标签字符串数组(标签字符串不允许有空格或者是tab字符)
void addTags(List<String> tags); /// tags 标签字符串数组(标签字符串不允许有空格或者是tab字符)
void setTags(List<String> tags); /// tags 标签字符串数组(标签字符串不允许有空格或者是tab字符)
void deleteTags(List<String> tags); void cleanTags(); /// badgeSum 角标值
void setBadge(int badgeSum); /// badgeSum 角标值
void setAppBadge(int badgeSum);/// 获取 XgAndroidApi 调用Android里的api接口
XgAndroidApi getXgAndroidApi();/// attributes 类型为 Map 字典(k, v字符串不允许有空格或者是tab字符)
void upsertAttributes(Map<String, String> attributes);/// attributes 类型为要删除属性 key 的字符串数组(字符串不允许有空格或者是tab字符)
void delAttributes(List<String> attributes);/// attributes 类型为 Map 字典(k, v字符串不允许有空格或者是tab字符)
void clearAndAppendAttributes(Map<String, String> attributes); void clearAttributes(); _onReceiveMessage 数据类型 Map<String, Object> para: iOS/Android返回不同的消息体,以双端返回kv为准 _onReceiveNotificationResponse 数据类型 Map<String, Object> para: iOS/Android返回不同的消息体,以双端返回kv为准 _xgPushClickAction 数据类型 Map<String, Object> para: iOS/Android返回不同的消息体,以双端返回kv为准 _onRegisteredDone 数据类型 String para: 注册成功信息 _onRegisteredDeviceToken 数据类型 String para: xgToken,注册失败如果有xgToken则返回 _unRegistered 数据类型 String para: 注销成功或者失败信息说明V1.2.8开始返回类型由String->Map,新增code及type标识!
_xgPushDidBindWithIdentifier 数据类型 Map<String, Object> para:
key:
code:int类型,操作结果,0代表成功
type: String类型,操作类型,取值为account/tag/attributes
msg: String类型,提示信息说明V1.2.8开始返回类型由String->Map,新增code及type标识!
_xgPushDidUnbindWithIdentifier 数据类型 Map<String, Object> para:
key:
code:int类型,操作结果,0代表成功
type: String类型,操作类型,取值为account/tag/attributes
msg: String类型,提示信息说明V1.2.8开始返回类型由String->Map,新增code及type标识!
_xgPushDidUpdatedBindedIdentifier 数据类型 Map<String, Object> para:
key:
code:int类型,操作结果,0代表成功
type: String类型,操作类型,取值为tag/attributes
msg: String类型,提示信息说明V1.2.8开始返回类型由String->Map,新增code及type标识!
_xgPushDidClearAllIdentifiers 数据类型 Map<String, Object> para:
key:
code:int类型,操作结果,0代表成功
type: String类型,操作类型,取值为account/tag/attributes
msg: String类型,提示信息说明:XgAndroidApi 为针对安卓独立接口的内部再次封装,可以通过
XgFlutterPlugin.xgApi直接访问,例如:// 调用示例:开启厂商其他推送接口 XgFlutterPlugin.xgApi.enableOtherPush()
enableOtherPush(); setMiPushAppId({String appId}); setMiPushAppKey({String appKey}); setMzPushAppId({String appId}); setMzPushAppKey({String appKey}); enableOppoNotification(); setOppoPushAppId({String appId}); setOppoPushAppKey({String appKey}); cancelAllNotification(); enablePullUpOtherApp({bool enable}) setBadgeNum({int badgeNum}) resetBadgeNum()