@capgo/capacitor-android-usagestatsmanager 8.2.5 → 8.2.7

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
- <a href="https://capgo.app/"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-android-usagestatsmanager" alt="Capgo - Instant updates for Capacitor" /></a>
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
- <h2><a href="https://capgo.app/?ref=plugin_android_usagestatsmanager"> ➡️ Get Instant updates for your App with Capgo</a></h2>
6
- <h2><a href="https://capgo.app/consulting/?ref=plugin_android_usagestatsmanager"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
8
+ <p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</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.5";
36
+ private final String pluginVersion = "8.2.7";
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.5"
10
+ private let pluginVersion: String = "8.2.7"
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.5",
3
+ "version": "8.2.7",
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",
@@ -37,7 +37,7 @@
37
37
  "verify:web": "npm run build",
38
38
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
39
39
  "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
40
- "eslint": "eslint . --ext ts",
40
+ "eslint": "eslint .",
41
41
  "prettier": "prettier-pretty-check \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
42
42
  "swiftlint": "node-swiftlint",
43
43
  "docgen": "docgen --api CapacitorUsageStatsManagerPlugin --output-readme README.md --output-json dist/docs.json",
@@ -56,12 +56,13 @@
56
56
  "@capacitor/core": "^8.0.0",
57
57
  "@capacitor/docgen": "^0.3.1",
58
58
  "@capacitor/ios": "^8.0.0",
59
- "@ionic/eslint-config": "^0.4.0",
59
+ "@ionic/eslint-config": "^0.5.0",
60
60
  "@ionic/prettier-config": "^4.0.0",
61
61
  "@ionic/swiftlint-config": "^2.0.0",
62
62
  "@types/node": "^24.10.1",
63
- "eslint": "^8.57.1",
64
- "eslint-plugin-import": "^2.31.0",
63
+ "@typescript-eslint/eslint-plugin": "^8.70.0",
64
+ "@typescript-eslint/parser": "^8.70.0",
65
+ "eslint": "^10.0.0",
65
66
  "prettier": "^3.6.2",
66
67
  "prettier-plugin-java": "^2.7.7",
67
68
  "rimraf": "^6.1.0",
@@ -75,9 +76,6 @@
75
76
  },
76
77
  "prettier": "@ionic/prettier-config",
77
78
  "swiftlint": "@ionic/swiftlint-config",
78
- "eslintConfig": {
79
- "extends": "@ionic/eslint-config/recommended"
80
- },
81
79
  "capacitor": {
82
80
  "ios": {
83
81
  "src": "ios"