@capgo/capacitor-android-usagestatsmanager 8.2.6 → 8.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
# @capgo/capacitor-android-usagestatsmanager
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Read Android app usage statistics from your Capacitor app with the `UsageStatsManager` API: screen time per app, usage intervals and raw usage events. Built for digital wellbeing, parental control and analytics apps.
|
|
4
|
+
|
|
5
|
+
<a href="https://capgo.app/?ref=plugin_android_usagestatsmanager"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-android-usagestatsmanager" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
3
6
|
|
|
4
7
|
<div align="center">
|
|
5
|
-
<
|
|
6
|
-
<h2><a href="https://capgo.app/
|
|
8
|
+
<p><b>Capgo</b>: push fixes to your Capacitor users in minutes, build signed iOS and Android apps without a Mac, and roll back in one click.</p>
|
|
9
|
+
<h2><a href="https://capgo.app/register/?ref=plugin_android_usagestatsmanager">➡️ Get started for free</a></h2>
|
|
10
|
+
<p>14-day unlimited free trial. No credit card required</p>
|
|
11
|
+
<p><a href="https://capgo.app/consulting/?ref=plugin_android_usagestatsmanager">Missing a feature? We'll build the plugin for you 💪</a></p>
|
|
7
12
|
</div>
|
|
8
13
|
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-android-usagestatsmanager/main/assets/github-social-preview.png" alt="@capgo/capacitor-android-usagestatsmanager for Capacitor apps" width="300" />
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
## Key features
|
|
19
|
+
|
|
20
|
+
- **Aggregated usage**: `queryAndAggregateUsageStats()` returns per-app usage for a time range.
|
|
21
|
+
- **Interval stats**: `queryUsageStats()` returns stats for daily, weekly, monthly or yearly intervals.
|
|
22
|
+
- **Raw events**: `queryEvents()` reads the usage event log for a time range.
|
|
23
|
+
- **Installed apps**: `queryAllPackages()` lists packages installed on the device.
|
|
24
|
+
- **Permission helpers**: `isUsageStatsPermissionGranted()` and `openUsageStatsSettings()` guide users to grant usage access.
|
|
25
|
+
- **Platforms**: Android. Android only. Web methods throw.
|
|
26
|
+
|
|
9
27
|
## Description
|
|
10
28
|
Exposes the Android's UsageStatsManager SDK to Capacitor
|
|
11
29
|
|
|
@@ -33,7 +33,7 @@ import java.util.Map;
|
|
|
33
33
|
@CapacitorPlugin(name = "CapacitorUsageStatsManager")
|
|
34
34
|
public class CapacitorUsageStatsManagerPlugin extends Plugin {
|
|
35
35
|
|
|
36
|
-
private final String pluginVersion = "8.2.
|
|
36
|
+
private final String pluginVersion = "8.2.8";
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Queries and aggregates usage stats for the given time range.
|
|
@@ -7,7 +7,7 @@ import Capacitor
|
|
|
7
7
|
*/
|
|
8
8
|
@objc(CapacitorUsageStatsManagerPlugin)
|
|
9
9
|
public class CapacitorUsageStatsManagerPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
-
private let pluginVersion: String = "8.2.
|
|
10
|
+
private let pluginVersion: String = "8.2.8"
|
|
11
11
|
public let identifier = "CapacitorUsageStatsManagerPlugin"
|
|
12
12
|
public let jsName = "CapacitorUsageStatsManager"
|
|
13
13
|
public let pluginMethods: [CAPPluginMethod] = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-android-usagestatsmanager",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.8",
|
|
4
4
|
"description": "Exposes the Android's UsageStatsManager SDK to Capacitor",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@ionic/eslint-config": "^0.5.0",
|
|
60
60
|
"@ionic/prettier-config": "^4.0.0",
|
|
61
61
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
62
|
-
"@types/node": "^
|
|
62
|
+
"@types/node": "^26.0.0",
|
|
63
63
|
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
64
64
|
"@typescript-eslint/parser": "^8.70.0",
|
|
65
65
|
"eslint": "^10.0.0",
|