申请短时后台任务闪退,日志如下
or message:BussinessError 9900002: Transient task verification failed. The remaining time to run transient task is insufficient.
Error code:9900002
SourceCode:
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
^
怎么查询24小时内剩余配额时间
关于 9900002 的报错请参看文档检查: https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/errorcode-backgroundtaskmgr-V5\#section9900002-短时任务校验失败
获取短时任务剩余时间
没有api可以查询24小时整体剩余配额时间,可以在backgroundTaskManager.requestSuspendDelay时加上try catch 捕捉错误提示,来判断是否超额