From 3abd4fec4c744c4af8693fd78d713472796cbb05 Mon Sep 17 00:00:00 2001
From: wyuanchao
This method queries usage information at the {@link #BY_OPTIMIZED} interval by default.
* * @since 7 - * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App + * @permission ohos.permission.BUNDLE_ACTIVE_INFO * @systemapi Hide this for inner system use. * @param begin Indicates the start time of the query period, in milliseconds. * @param end Indicates the end time of the query period, in milliseconds. @@ -185,9 +173,7 @@ declare namespace bundleState { * Declares interval type. * * @since 7 - * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @permission ohos.permission.BUNDLE_ACTIVE_INFO. - * @systemapi Hide this for inner system use. + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App */ export enum IntervalType { /** @@ -220,8 +206,8 @@ declare namespace bundleState { * Queries usage information about each bundle within a specified period at a specified interval. * * @since 7 - * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App + * @permission ohos.permission.BUNDLE_ACTIVE_INFO * @systemapi Hide this for inner system use. * @param byInterval Indicates the interval at which the usage statistics are queried. * The value can be {@link #BY_OPTIMIZED}, {@link #BY_DAILY}, @@ -237,8 +223,8 @@ declare namespace bundleState { * Queries state data of all bundles within a specified period identified by the start and end time. * * @since 7 - * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @permission ohos.permission.BUNDLE_ACTIVE_INFO. + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App + * @permission ohos.permission.BUNDLE_ACTIVE_INFO * @systemapi Hide this for inner system use. * @param begin Indicates the start time of the query period, in milliseconds. * @param end Indicates the end time of the query period, in milliseconds. @@ -251,9 +237,7 @@ declare namespace bundleState { * Queries state data of the current bundle within a specified period. * * @since 7 - * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App. - * @permission ohos.permission.BUNDLE_ACTIVE_INFO. - * @systemapi Hide this for inner system use. + * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App * @param begin Indicates the start time of the query period, in milliseconds. * @param end Indicates the end time of the query period, in milliseconds. * @return Returns the {@link BundleActiveState} object Array containing the state data of the current bundle. -- Gitee From bbee1866c5a9c6b8ac15956f16de02a50867cdd3 Mon Sep 17 00:00:00 2001 From: wyuanchaoqueryBundleActiveStates(begin::number, end::number, callback:AsyncCallback<Array<BundleActiveState>>):void
+queryBundleActiveStates(begin:number, end:number, callback:AsyncCallback<Array<BundleActiveState>>):void
Queries the event collection of all applications through time interval.
queryBundleStateInfos(begin::number, end::number, callback:AsyncCallback<BundleStateInfoResponse>):void
+queryBundleStateInfos(begin:number, end:number, callback:AsyncCallback<BundleStateInfoResponse>):void
Uses the start and end time to query the application usage time statistics.
queryCurrentBundleActiveStates(begin::number, end::number, callback:AsyncCallback<Array<BundleActiveState>>):void
+queryCurrentBundleActiveStates(begin:number, end:number, callback:AsyncCallback<Array<BundleActiveState>>):void
Queries the event collection of the current application through the time interval.
-queryBundleStateInfoByInterval(byInterval:intervalType, begin::number, end::number, callback:AsyncCallback<Array<BundleStateInfo>>):void
+queryBundleStateInfoByInterval(byInterval:intervalType, begin:number, end:number, callback:AsyncCallback<Array<BundleStateInfo>>):void
Queries application usage duration statistics by time interval.
queryAppUsagePriorityGroup(callback:AsyncCallback<number>):void
@@ -76,7 +75,6 @@ Taking app usage interface as an example, the main exposed interfaces are as fol There are many interfaces for device usage statistics. Take app usage interface as an example to introduce the interface logic. -- **running process**:The device usage statistics service starts and runs in the foundation process. - **device usage statistics saving time**: >1. refreshing is triggered every 30 minutes; >2. refreshing is triggered when system time changes; diff --git a/README_ZH.md b/README_ZH.md index 8d12502..8692a54 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -16,16 +16,15 @@ ``` /foundation/resourceschedule/device_usage_statistics -├── ohos.build # 编译脚本 ├── BUILD.gn # 模块编译脚本 +├── LICENSE # 开源协议 +├── adapter # 适配目录 +├── bundle.json # 部件化解耦及编译脚本 +├── frameworks # 框架层目录 ├── interfaces -│ ├── innerkits # 对内接口目录 -│ └── kits # 对外接口目录 +│ ├── innerkits # 对内接口目录 +│ └── kits # 对外接口目录 ├── services # 服务层目录 -├── frameworks -│ ├── JS # 对外JS接口实现目录 -│ └── native # 对外Native接口实现目录 -├── adapter # 适配目录 └── test # 测试用例目录 ``` @@ -42,20 +41,20 @@queryBundleActiveStates(begin::number, end::number, callback:AsyncCallback<Array<BundleActiveState>>):void
+queryBundleActiveStates(begin:number, end:number, callback:AsyncCallback<Array<BundleActiveState>>):void
queryBundleStateInfos(begin::number, end::number, callback:AsyncCallback<BundleStateInfoResponse>):void
+queryBundleStateInfos(begin:number, end:number, callback:AsyncCallback<BundleStateInfoResponse>):void
queryCurrentBundleActiveStates(begin::number, end::number, callback:AsyncCallback<Array<BundleActiveState>>):void
+queryCurrentBundleActiveStates(begin:number, end:number, callback:AsyncCallback<Array<BundleActiveState>>):void
queryBundleStateInfoByInterval(byInterval:intervalType, begin::number, end::number, callback:AsyncCallback<Array<BundleStateInfo>>):void
+queryBundleStateInfoByInterval(byInterval:intervalType, begin:number, end:number, callback:AsyncCallback<Array<BundleStateInfo>>):void
queryAppUsagePriorityGroup(callback:AsyncCallback<number>):void
@@ -73,7 +72,6 @@ 设备使用信息统计接口众多,以应用使用详情(app usage)接口为例,介绍接口逻辑。 -- **运行进程**:设备使用信息统计服务在foundation进程启动和运行。 - **应用使用统计信息落盘时机**: >1. 每隔30分钟触发一次刷新; >2. 系统时间变更触发一次刷新; @@ -84,7 +82,7 @@ >3. 根据起止时间查询当前应用的事件集合; >4. 根据interval(日、周、月、年)类型和起止时间查询应用的使用时长; >5. 查询调用者应用的优先级群组; ->5. 判断指定应用当前是否是空闲状态; +>6. 判断指定应用当前是否是空闲状态; ## 相关仓 -- Gitee From bb41f57a59c37ee77188bb659633aedba4d1a9e7 Mon Sep 17 00:00:00 2001 From: wyuanchao