提交 00d73023 编写于 作者: E ester.zhou

update device-usage-statistics-dev-guide.md (7744)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 ccd2f913
......@@ -421,13 +421,13 @@ import stats from '@ohos.bundleState';
```javascript
import stats from '@ohos.bundleState'
//promise
// Promise mode
stats.unRegisterGroupCallBack().then(() => {
console.log('BUNDLE_ACTIVE UnRegisterGroupCallBack promise succeeded.');
}).catch(err => {
console.log('BUNDLE_ACTIVE UnRegisterGroupCallBack promise failed. because: ' + err.code);
});
//callback
// Asynchronous callback mode
stats.unRegisterGroupCallBack((err) => {
if (err) {
console.log('BUNDLE_ACTIVE UnRegisterGroupCallBack callback failed, because: ' + err.code);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册