android: native GPS tracking with foreground service for screen-off support
Move GPS collection from WebView JS (watchPosition) to native Android LocationForegroundService, which survives screen-off. JS polls native side for accumulated points. Also: auto-enable GPS for cardio exercises, filter saved track to workout duration only, fix live map batch updates, notification tap opens active workout, and fix build script for pnpm.
This commit is contained in:
@@ -119,6 +119,7 @@
|
||||
$effect(() => {
|
||||
const len = gps.track.length;
|
||||
if (len > prevTrackLen && liveMap && gps.latestPoint) {
|
||||
// Add all new points since last update (native polling delivers batches)
|
||||
for (let i = prevTrackLen; i < len; i++) {
|
||||
const p = gps.track[i];
|
||||
livePolyline.addLatLng([p.lat, p.lng]);
|
||||
|
||||
Reference in New Issue
Block a user