From 00d73023a20c85b2e65212aff7d2760a107ef0c8 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Tue, 9 Aug 2022 20:46:20 +0800 Subject: [PATCH] update device-usage-statistics-dev-guide.md (7744) Signed-off-by: ester.zhou --- .../device-usage-statistics-dev-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md b/en/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md index fb107049c5..01fe1ed68b 100644 --- a/en/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md +++ b/en/application-dev/device-usage-statistics/device-usage-statistics-dev-guide.md @@ -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); -- GitLab