@capgo/capacitor-device-info 8.0.1 → 8.0.3
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 +49 -8
- package/android/src/main/java/app/capgo/deviceinfo/DeviceInfo.java +1 -1
- package/ios/Sources/DeviceInfoPlugin/DeviceInfo.swift +1 -1
- package/ios/Sources/DeviceInfoPlugin/DeviceInfoPlugin.swift +1 -1
- package/ios/Tests/DeviceInfoPluginTests/DeviceInfoTests.swift +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,15 +7,58 @@
|
|
|
7
7
|
<h2><a href="https://capgo.app/consulting/?ref=plugin_device_info">Missing a feature? We build Capacitor plugins</a></h2>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
-
Capacitor plugin for
|
|
10
|
+
Production-ready Capacitor plugin for device diagnostics, support screens, QA tools, and in-app performance dashboards. Read CPU, memory, GPU, storage, thermal, low-power-mode, and onboard sensor data from iOS, Android, and Web with one snapshot call or a live interval stream.
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-device-info/main/.github/assets/device-info-example.png" alt="@capgo/capacitor-device-info example app streaming CPU, memory, storage, GPU, and onboard sensor metrics" width="900" />
|
|
14
|
+
</p>
|
|
11
15
|
|
|
12
16
|
## Features
|
|
13
17
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
18
|
+
- One API for instant snapshots and live monitoring streams.
|
|
19
|
+
- No runtime permissions for the metrics currently exposed.
|
|
20
|
+
- Built for support/debug dashboards: identify low memory, storage pressure, low power mode, thermal state, GPU renderer, and hardware sensor availability.
|
|
21
|
+
- Listener-first streaming for charts: `deviceInfoUpdate` emits CPU, memory, storage, GPU, thermal, and sensor snapshots on a configurable interval.
|
|
22
|
+
- Auto-stop streams by `durationMs` or `sampleCount`.
|
|
23
|
+
- Onboard sensor catalog with common readings when hardware exposes them: battery temperature, ambient temperature, relative humidity, pressure, light, and proximity.
|
|
24
|
+
- Native implementations: Metal, Mach, and CoreMotion availability on iOS; ActivityManager, StatFs, `/proc`, OpenGL ES, SensorManager, and thermal zones on Android.
|
|
25
|
+
|
|
26
|
+
## What You Can Read
|
|
27
|
+
|
|
28
|
+
| Area | Data |
|
|
29
|
+
| ---- | ---- |
|
|
30
|
+
| CPU | Core count, active cores, architecture, model, usage percent, max frequency, Android best-effort CPU temperature |
|
|
31
|
+
| Memory | Total/free/used bytes, used percent, app heap usage/limit, low-memory flag, pressure state |
|
|
32
|
+
| Storage | Total/free/used bytes and used percent for the app data volume |
|
|
33
|
+
| GPU | API, vendor, renderer, version, max texture size, Android best-effort GPU temperature |
|
|
34
|
+
| Power | Low power mode / battery saver state |
|
|
35
|
+
| Thermal | Platform thermal state: `nominal`, `fair`, `serious`, `critical`, or `unknown` |
|
|
36
|
+
| Sensors | Full onboard sensor list plus sampled readings for supported environmental/proximity sensors |
|
|
37
|
+
| Stream metadata | Sequence number, stream start timestamp, elapsed milliseconds |
|
|
38
|
+
|
|
39
|
+
## Sensor Coverage
|
|
40
|
+
|
|
41
|
+
| Reading | iOS | Android | Web |
|
|
42
|
+
| ------- | --- | ------- | --- |
|
|
43
|
+
| Sensor availability list | CoreMotion sensor availability | `SensorManager` full sensor list | Empty fallback |
|
|
44
|
+
| CPU/GPU temperature | Not exposed by public iOS APIs | Best-effort thermal-zone reads | Not exposed |
|
|
45
|
+
| Battery temperature | Not exposed by public iOS APIs | `ACTION_BATTERY_CHANGED` | Not exposed |
|
|
46
|
+
| Ambient temperature | Not exposed | Sampled when `TYPE_AMBIENT_TEMPERATURE` exists | Not exposed |
|
|
47
|
+
| Relative humidity | Not exposed | Sampled when `TYPE_RELATIVE_HUMIDITY` exists | Not exposed |
|
|
48
|
+
| Pressure | Barometer availability | Sampled when `TYPE_PRESSURE` exists | Not exposed |
|
|
49
|
+
| Light | Not exposed | Sampled when `TYPE_LIGHT` exists | Not exposed |
|
|
50
|
+
| Proximity | Not exposed | Sampled when `TYPE_PROXIMITY` exists | Not exposed |
|
|
51
|
+
|
|
52
|
+
Sensor data is onboard-only. This plugin does not call weather services or fetch outside temperature/humidity from the network.
|
|
53
|
+
|
|
54
|
+
## Common Use Cases
|
|
55
|
+
|
|
56
|
+
- Add a diagnostics panel to support tickets.
|
|
57
|
+
- Stream device metrics into an in-app performance graph.
|
|
58
|
+
- Detect low-memory or low-storage conditions before heavy work.
|
|
59
|
+
- Show hardware/GPU details when debugging device-specific rendering bugs.
|
|
60
|
+
- Log thermal and low-power state around slow sessions.
|
|
61
|
+
- Discover available sensors before enabling sensor-heavy features.
|
|
19
62
|
|
|
20
63
|
## Compatibility
|
|
21
64
|
|
|
@@ -56,8 +99,6 @@ await handle.remove();
|
|
|
56
99
|
|
|
57
100
|
CPU usage is calculated from deltas, so the first native sample may omit `cpu.usagePercent`. Periodic monitoring fills it after the second sample when the platform exposes CPU ticks.
|
|
58
101
|
|
|
59
|
-
Sensor data is onboard-only. This plugin does not call weather services or fetch outside temperature/humidity from the network.
|
|
60
|
-
|
|
61
102
|
## Platform Notes
|
|
62
103
|
|
|
63
104
|
- iOS requires no permissions for the metrics exposed here. GPU data comes from Metal, CPU and memory data comes from Mach APIs, and sensor availability comes from CoreMotion checks. iOS public APIs do not expose raw CPU/GPU temperature.
|
package/package.json
CHANGED