设置角标

使用说明

客户端 Android iOS
支持说明 仅支持华为 支持
import { PushNotification } from "@yl/super-jssdk";

PushNotification.setPushBadgeNumber(optional);

参数说明

参数 类型 必填 作用
optional Object 必填参数

optional

参数 类型 必填 作用
count number 角标数量

返回说明

参数 类型 作用
resolve Function 设置角标成功回调
reject(err) Function 设置角标失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"}

代码示例

PushNotification.setPushBadgeNumber({count: 2})
  .then(res => {
    console.log('success', res);
  })
  .catch(err => {
    console.log('fail', res);
  })

results matching ""

    No results matching ""