设置App桌面图标上显示的角标数字
设置应用图标上显示的数字
// #ifdef APP-PLUS plus.runtime.setBadgeNumber(number, options); plus.runtime.setBadgeNumber(99); // #endif
参数:
- number:(Number)必选:
要显示的角标数字值,参数未0,则表示清除角标数字
- options:(BadgeOptions)可选:
小米手机显示角标需要在系统消息中心显示一条通知。此参数用于设置通知的标题(title)和内容(content)
平台支持
- Android - 2.2+(支持):
目前仅支持小米(MIUI6及以上)和华为设备,其它设备调用后无任何效果;
HBuilderX2.9.9+版本支持VIVO设备。
- iOS - 4.3+ (支持) :
应用需开启“Push Notifications”服务才生效。
浙公网安备 33010602011771号