Skip to content

@capgo/capacitor-android-usagestatsmanager

Capacitor plugin for accessing Android UsageStatsManager API.

Capacitor plugin for accessing Android UsageStatsManager API.

  • queryAndAggregateUsageStats - Queries and aggregates usage stats for the given time range.
  • isUsageStatsPermissionGranted - Checks if the usage stats permission is granted.
  • openUsageStatsSettings - Open the usage stats settings screen. This will open the usage stats settings screen, which allows the user to grant the usage stats permission. This will always open the settings screen, even if the permission is already granted.
  • queryAllPackages - Queries all installed packages on the device. Requires the QUERY_ALL_PACKAGES permission.
MethodDescription
queryAndAggregateUsageStatsQueries and aggregates usage stats for the given time range.
isUsageStatsPermissionGrantedChecks if the usage stats permission is granted.
openUsageStatsSettingsOpen the usage stats settings screen. This will open the usage stats settings screen, which allows the user to grant the usage stats permission. This will always open the settings screen, even if the permission is already granted.
queryAllPackagesQueries all installed packages on the device. Requires the QUERY_ALL_PACKAGES permission.
getPluginVersionGet the native Capacitor plugin version.

This reference is synced from src/definitions.ts in capacitor-android-usagestatsmanager.