Repository navigation
Data Usage Tracker 3.3.0
The Android app warns you when it stops syncing, and the dashboard restarts itself after a crash.
Added
- Android app 1.4: a notification after 7 days without a successful sync. Android keeps about 90 days of per-app history, so a week loses nothing. The alert is there so a changed dashboard address, a rotated token, revoked usage access, or a phone that never reaches home Wi-Fi is noticed with most of that window left. The check is its own twice-daily job with no network requirement, because the sync job runs only on unmetered networks and so could never report the commonest failure. It repeats at most once a day and clears on the next successful sync. On Android 13+ the app asks for notification permission; the status screen shows "Sync alerts: OFF" when it is denied, and now lists the last successful sync.
npm run firewall(scripts/firewall-private-only.ps1, run once from an Administrator shell) blocks the dashboard's port, 7843, on Public networks. Windows' first prompt for Node.js usually allows Public networks too, so with network access on, a laptop on cafe or hotel Wi-Fi offered the login form, over plain HTTP, to everyone there. It refuses to run while you are on a network marked Public, so a home network still filed as Public is not cut off.stop-dashboard.bat: a double-click off switch for the dashboard. It stops only this project's server on 7843 and leaves collection and the logon task alone.
Changed
- The dashboard restarts itself after a crash, 60 s apart and at most 3 times in 10 minutes;
stop-dashboard.batmarks its stop as wanted first. Every scheduled task also retries 3 times, a minute apart, when it fails to start. start-data-usage-dashboard.bat:FORCE_BUILD=1rebuilds first, and when the port is already in use it says what is most likely holding it and waits, instead of closing at once.
Upgrading
git pull, npm ci, npm run build, then restart the dashboard. To pick up the task retries, re-run scripts\register-task.ps1 and scripts\install-autostart.ps1 from an Administrator PowerShell. To block the port on Public networks, run npm run firewall once from an Administrator shell.
On each phone, install data-usage-reporter-1.4.apk over 1.3 (adb install -r data-usage-reporter-1.4.apk); settings and sync state are kept. Open the app once afterwards, which schedules the new check and, on Android 13+, asks for notification permission.
A phone still on 1.2 cannot install 1.4 over it. 1.2 was debug-signed and Android refuses an update across signing keys, with "App not installed as package conflicts with an existing package". Uninstall it first (if that is still refused, adb uninstall com.naimul.datausage removes copies left in Private Space, Dual Apps or a work profile), install 1.4, set it up again and sync. The reinstalled app reports under a new device id, so the phone appears twice; 3.4.0 adds npm run android:merge to fold the old entry into the new one.
Android app
data-usage-reporter-1.4.apk is Data Usage Reporter 1.4 (versionCode 5, Android 8.0+), built from this release's android/ source and signed with the project's release key:
CN=Data Usage Tracker
SHA-256 ab:34:f0:77:4f:3d:c5:0b:7e:0d:e7:c0:04:7e:ee:ce:82:01:89:1a:a4:da:37:73:ca:b1:52:19:06:13:4f:a1