Files
corescope-rx/package.json
T
efitenandClaude Opus 5.5 b6f90aed40 feat(native): Capacitor Bluetooth transport and background GPS behind src/platform.js
Step 1 of a native Android app (issue #13). The Android WebView has no Web
Bluetooth, so CapacitorBleTransport (src/transport-native.js) implements
the WebBluetoothTransport API on @capacitor-community/bluetooth-le: NUS
service, notify to every onFrame listener, serialised writes, reconnect
with backoff. The plugin requests a 512-byte MTU on connect (Device.kt).

NativeGps (src/gps-native.js) uses @capacitor-community/background-
geolocation with a backgroundMessage, which runs a foreground service, so
fixes should keep coming with the screen off. That is the point of the
native app; it is not verified on a device yet.

src/platform.js picks one or the other via Capacitor.isNativePlatform().
In the browser nothing changes in behaviour; the web bundle grows by
about 21 kB (512 kB, was 490 kB) because the plugin JS is now imported.
The service worker is not registered in the native app, and the Web
Bluetooth notice is not shown there.

Tests: 9 new in test/native.test.mjs with injected plugin fakes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:46:21 +01:00

36 lines
1.0 KiB
JSON

{
"name": "coredrive-rx",
"version": "1.23.0",
"private": false,
"license": "GPL-3.0-or-later",
"type": "module",
"description": "Mobile RX coverage capture for CoreScope: BLE companion → MQTT (GPS + SNR/RSSI + multibyte)",
"repository": {
"type": "git",
"url": "git+https://github.com/efiten/coredrive-rx.git"
},
"homepage": "https://github.com/efiten/coredrive-rx#readme",
"bugs": "https://github.com/efiten/coredrive-rx/issues",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "node --test",
"deploy": "bash deploy.sh",
"android:sync": "vite build && cap sync android"
},
"dependencies": {
"@capacitor-community/background-geolocation": "1.3.1",
"@capacitor-community/bluetooth-le": "8.3.0",
"@capacitor/core": "8.6.0",
"@noble/ciphers": "2.0.1",
"@noble/ed25519": "^3.2.0",
"mqtt": "^5.10.1"
},
"devDependencies": {
"@capacitor/android": "8.6.0",
"@capacitor/cli": "8.6.0",
"vite": "^6.4.5"
}
}