Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start backgrond location dont work #2239

Open
Borges53 opened this issue Dec 30, 2024 · 4 comments
Open

Start backgrond location dont work #2239

Borges53 opened this issue Dec 30, 2024 · 4 comments

Comments

@Borges53
Copy link

Borges53 commented Dec 30, 2024

Your Environment

  • Plugin version: 4.15.0
  • Platform: Android
  • OS version: 15
  • Device manufacturer / model: EMULATOR
  • React Native version (react-native -v): 0.73.9
  • Plugin config
import BackgroundGeolocation from 'react-native-background-geolocation';
import {useTaskPersistStore} from './storages/TaskStorage';
import {useAuthPersistStore} from './storages/AuthStorage';

export const configureBackgroundGeolocation = async () => {
let tasks = useTaskPersistStore.getState().tasks;
const userData = useAuthPersistStore.getState().user;
const CheckBackgroundLocation =
useAuthPersistStore.getState().checkBackgroundLocation;
let aux = tasks.find(
task =>
task.job_status_ === 'inprogress' &&
task.template_id_?.location_accuracy_ != 'none',
);

await BackgroundGeolocation.ready(
{
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
distanceFilter: 5,
stopTimeout: 5,
// Debug
debug: true,
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
// HTTP & Persistence
maxDaysToPersist: 14,
url: ${process.env.API_ENDPOINT}Geo/Sync || 'awdads',
autoSync: true,
//batchSync: true,
params: {
user_id:
userData?.type == 'manager'
? userData?.agent_id_?._id
: userData?._id,
// ...(!!aux ? {taskId: aux._id} : {}),
},
// Application
stopOnTerminate: true,
startOnBoot: true,
enableHeadless: true,
// Permissions
locationAuthorizationRequest: 'Always',
backgroundPermissionRationale: {
title:
"Allow {applicationName} to access this device's location even when closed or not in use.",
message:
'This app collects location data to enable recording your trips to work and calculate distance-travelled.',
positiveAction: 'Change to "{backgroundPermissionOptionLabel}"',
negativeAction: 'Cancel',
},
},
async state => {
let checkBackgroundLocation =
useAuthPersistStore.getState().checkBackgroundLocation;
if (checkBackgroundLocation) {
await BackgroundGeolocation.start();
} else {
await BackgroundGeolocation.stop();
}
},
);
};

const isLocationEnabled = async (): Promise => {
const state = await BackgroundGeolocation.getState();
if (!state.enabled) {
return false;
}
return true;
};


<Switch value={checkBackgroundLocation} thumbColor={ checkBackgroundLocation ? COLORS.primary : '#f4f3f4' } disabled={!isConnected} onValueChange={async value => { if (value) { BackgroundGeolocation.start( async () => { console.log('- Start success'); }, async error => { console.log('- Start failure: ', error); }, ); } else { console.log('STOP'); BackgroundGeolocation.stop(); } setBackGroundLocation(value); }} trackColor={{false: '#f4f3f4', true: COLORS.primary}} />

Expected Behavior

When I slide the switch I should be able to start the geolocation and send it to the back.

Actual Behavior

When I slide the switch I should be able to start the geolocation but it doesn't send to the backend nor does it play any noise from the backend.

Context

I am working on an application that should track the user, in principle by default I am looking for an application that tracks with a distance of interval 5. The geolocation should be activated when in the profile section is activated with a switch. Then once activated the geolocations should go to my server where I store them.

@christocracy
Copy link
Member

See wiki “Debugging”. Learn to observe the native logs.

@Borges53
Copy link
Author

Borges53 commented Dec 31, 2024

[c.t.l.l.TSLocationManager a]
12-31 12:33:13.215 11408 12240 D TSLocationManager: ℹ️ Clear last odometer location
12-31 12:33:13.216 11408 12240 D TSLocationManager: [c.t.l.g.TSGeofenceManager stopMonitoringStationaryRegion]
12-31 12:33:13.216 11408 12240 D TSLocationManager: 🔴 Stop monitoring stationary region
12-31 12:33:13.216 11408 12241 D TSLocationManager: [c.t.l.g.TSGeofenceManager c]
12-31 12:33:13.216 11408 12241 D TSLocationManager: 🔴 Stop monitoring geofences
12-31 12:33:13.217 11408 12240 I TSLocationManager: [c.t.l.s.ActivityRecognitionService stop]
12-31 12:33:13.217 11408 12240 I TSLocationManager: 🔴 Stop motion-activity updates
12-31 12:33:13.217 11408 12240 I TSLocationManager: [c.t.l.service.HeartbeatService stop]
12-31 12:33:13.217 11408 12240 I TSLocationManager: 🔴 Stop heartbeat
12-31 12:33:13.218 11408 12240 D TSLocationManager: [c.t.l.http.HttpService stopMonitoringConnectivityChanges]
12-31 12:33:13.218 11408 12240 D TSLocationManager: 🔴 Stop monitoring connectivity changes
12-31 12:33:13.220 11408 12240 D TSLocationManager: [c.t.l.device.DeviceSettings stopMonitoringPowerSaveChanges]
12-31 12:33:13.220 11408 12240 D TSLocationManager: 🔴 Stop monitoring powersave changes
12-31 12:33:13.591 11408 11802 I ReactNativeJS: ---- token: exist ---
12-31 12:33:29.291 11408 11803 D TSLocationManager: [c.t.l.u.LocationAuthorization withBackgroundPermission]
12-31 12:33:29.291 11408 11803 D TSLocationManager: ℹ️ LocationAuthorization: Permission granted
12-31 12:33:29.311 11408 12240 I TSLocationManager: - Enable: false → true, trackingMode: 1
12-31 12:33:29.312 11408 12240 I TSLocationManager: [c.t.l.g.TSGeofenceManager start]
12-31 12:33:29.312 11408 12240 I TSLocationManager: 🎾 Start monitoring geofences
12-31 12:33:29.315 11408 12240 D TSLocationManager: [c.t.l.http.HttpService startMonitoringConnectivityChanges]
12-31 12:33:29.315 11408 12240 D TSLocationManager: 🎾 Start monitoring connectivity changes
12-31 12:33:29.317 11408 12240 D TSLocationManager: [c.t.l.device.DeviceSettings startMonitoringPowerSaveChanges]
12-31 12:33:29.317 11408 12240 D TSLocationManager: 🎾 Start monitoring powersave changes
12-31 12:33:29.318 11408 12240 I TSLocationManager: [c.t.l.s.ActivityRecognitionService start]
12-31 12:33:29.318 11408 12240 I TSLocationManager: 🎾 Start motion-activity updates
12-31 12:33:29.319 11408 11504 D TSLocationManager: [c.t.l.http.HttpService a]
12-31 12:33:29.319 11408 11504 D TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:29.319 11408 11504 D TSLocationManager: ║ 📶 Connectivity change: connected? true
12-31 12:33:29.319 11408 11504 D TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:29.321 11408 12240 I TSLocationManager: [c.t.l.service.HeartbeatService stop]
12-31 12:33:29.321 11408 12240 I TSLocationManager: 🔴 Stop heartbeat
12-31 12:33:29.326 11408 12240 I TSLocationManager: [c.t.l.service.TrackingService changePace]
12-31 12:33:29.326 11408 12240 I TSLocationManager: 🔵 setPace: false → false
12-31 12:33:29.345 11408 11408 I TSLocationManager: [c.t.l.l.TSLocationManager a]
12-31 12:33:29.345 11408 11408 I TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:29.345 11408 11408 I TSLocationManager: ║ motionchange LocationResult: 8 (258784ms old)
12-31 12:33:29.345 11408 11408 I TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:29.345 11408 11408 I TSLocationManager: ╟─ 📍 Location[fused 6.184978,-71.668988 hAcc=5.0 et=+44m14s561ms alt=0.0 vAcc=0.5 vel=27.384308 sAcc=0.5 bear=265.22897 bAcc=30.0], time: 1735648150560
12-31 12:33:29.368 11408 11408 D TSLocationManager: [c.t.l.l.TSLocationManager a] Median accuracy: 5.0
12-31 12:33:29.371 11408 11408 D TSLocationManager: [c.t.l.u.LocationAuthorization withPermission]
12-31 12:33:29.371 11408 11408 D TSLocationManager: ℹ️ LocationAuthorization: Permission granted
12-31 12:33:29.422 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:29.422 11408 11408 D TSLocationManager: 🎾 start [LocationRequestService startId: 1, eventCount: 1]
12-31 12:33:29.422 11408 12240 I TSLocationManager: [c.t.l.l.SingleLocationRequest startUpdatingLocation]
12-31 12:33:29.422 11408 12240 I TSLocationManager: 🔵 [SingleLocationRequest start, action: 1, requestId: 8]
12-31 12:33:29.438 11408 12240 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:29.438 11408 12240 D TSLocationManager: ⚙️︎ FINISH [LocationRequestService startId: 1, eventCount: 0, sticky: true]
12-31 12:33:29.538 11408 11408 I TSLocationManager: [c.t.l.s.TSScheduleManager oneShot]
12-31 12:33:29.538 11408 11408 I TSLocationManager: ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
12-31 12:33:29.567 11408 11408 D TSLocationManager: [c.t.l.a.TSLocationManagerActivity a] locationsettings
12-31 12:33:29.567 11408 11408 D TSLocationManager: [c.t.l.adapter.TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
12-31 12:33:29.593 11408 11408 D TSLocationManager: [c.t.l.a.TSLocationManagerActivity c] eventCount: 0
12-31 12:33:29.656 11408 11408 D TSLocationManager: [c.t.l.a.TSLocationManagerActivity onDestroy]
12-31 12:33:29.780 11408 11802 I ReactNativeJS: ---- token: exist ---
12-31 12:33:29.842 11408 11802 I ReactNativeJS: - Start success
12-31 12:33:29.843 11408 11802 I ReactNativeJS: 'location', { battery: { level: 1, is_charging: false },
12-31 12:33:29.843 11408 11802 I ReactNativeJS: activity: { confidence: 100, type: 'still' },
12-31 12:33:29.843 11408 11802 I ReactNativeJS: extras: {},
12-31 12:33:29.843 11408 11802 I ReactNativeJS: sample: true,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: is_moving: false,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: age: 258809,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: uuid: 'af28966b-ec5c-4c03-869f-adc3f71d5a6c',
12-31 12:33:29.843 11408 11802 I ReactNativeJS: odometer: 14722096,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: coords:
12-31 12:33:29.843 11408 11802 I ReactNativeJS: { age: 258831,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: ellipsoidal_altitude: 0,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: altitude: 0,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: altitude_accuracy: 0.5,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: heading_accuracy: 30,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: heading: 265.23,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: speed: 27.38,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: accuracy: 5,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: longitude: -71.6689884,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: speed_accuracy: 0.5,
12-31 12:33:29.843 11408 11802 I ReactNativeJS: latitude: 6.1849777 },
12-31 12:33:29.843 11408 11802 I ReactNativeJS: timestamp: '2024-12-31T12:29:10.560Z' }
12-31 12:33:29.852 11408 11408 I TSLocationManager: [c.t.l.l.TSLocationManager a]
12-31 12:33:29.852 11408 11408 I TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:29.852 11408 11408 I TSLocationManager: ║ getCurrentPosition LocationResult: 9 (259291ms old)
12-31 12:33:29.852 11408 11408 I TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:29.852 11408 11408 I TSLocationManager: ╟─ 📍 Location[fused 6.184978,-71.668988 hAcc=5.0 et=+44m14s561ms alt=0.0 vAcc=0.5 vel=27.384308 sAcc=0.5 bear=265.22897 bAcc=30.0], time: 1735648150560
12-31 12:33:29.868 11408 11408 D TSLocationManager: [c.t.l.l.TSLocationManager a] Median accuracy: 5.0
12-31 12:33:29.870 11408 11408 D TSLocationManager: [c.t.l.u.LocationAuthorization withPermission]
12-31 12:33:29.870 11408 11408 D TSLocationManager: ℹ️ LocationAuthorization: Permission granted
12-31 12:33:29.876 11408 11802 W ReactNativeJS: ---------- asyncCheckToBlock ----------
12-31 12:33:29.885 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:29.885 11408 11408 D TSLocationManager: 🎾 start [LocationRequestService startId: 2, eventCount: 1]
12-31 12:33:29.886 11408 12240 I TSLocationManager: [c.t.l.l.SingleLocationRequest startUpdatingLocation]
12-31 12:33:29.886 11408 12240 I TSLocationManager: 🔵 [SingleLocationRequest start, action: 2, requestId: 9]
12-31 12:33:29.888 11408 12240 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:29.888 11408 12240 D TSLocationManager: ⚙️︎ FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: true]
12-31 12:33:29.893 11408 11802 I ReactNativeJS: 'location', { battery: { level: 1, is_charging: false },
12-31 12:33:29.893 11408 11802 I ReactNativeJS: activity: { confidence: 100, type: 'still' },
12-31 12:33:29.893 11408 11802 I ReactNativeJS: extras: {},
12-31 12:33:29.893 11408 11802 I ReactNativeJS: sample: true,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: is_moving: false,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: age: 259309,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: uuid: '0936d65b-f7a2-4804-b34d-c3aa73ba0958',
12-31 12:33:29.893 11408 11802 I ReactNativeJS: odometer: 14722096,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: coords:
12-31 12:33:29.893 11408 11802 I ReactNativeJS: { age: 259313,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: ellipsoidal_altitude: 0,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: altitude: 0,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: altitude_accuracy: 0.5,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: heading_accuracy: 30,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: heading: 265.23,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: speed: 27.38,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: accuracy: 5,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: longitude: -71.6689884,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: speed_accuracy: 0.5,
12-31 12:33:29.893 11408 11802 I ReactNativeJS: latitude: 6.1849777 },
12-31 12:33:29.893 11408 11802 I ReactNativeJS: timestamp: '2024-12-31T12:29:10.560Z' }
12-31 12:33:30.321 11408 12240 I TSLocationManager: [c.t.l.http.HttpService flush]
12-31 12:33:30.321 11408 12240 I TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:30.321 11408 12240 I TSLocationManager: ║ HTTP Service (count: 0)
12-31 12:33:30.321 11408 12240 I TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:33.731 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:33.731 11408 11408 D TSLocationManager: 🎾 1:8 [LocationRequestService startId: 3, eventCount: 1]
12-31 12:33:33.732 11408 12240 I TSLocationManager: [c.t.l.l.TSLocationManager a]
12-31 12:33:33.732 11408 12240 I TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:33.732 11408 12240 I TSLocationManager: ║ motionchange LocationResult: 8 (10ms old)
12-31 12:33:33.732 11408 12240 I TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:33.732 11408 12240 I TSLocationManager: ╟─ 📍 Location[fused 6.184980,-71.668960 hAcc=5.0 et=+48m37s721ms alt=0.0 vAcc=0.5 vel=37.802036 sAcc=0.5 bear=264.30862 bAcc=30.0], time: 1735648413720
12-31 12:33:33.733 11408 12240 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
12-31 12:33:33.733 11408 12240 I TSLocationManager: 🔵 Acquired motionchange position, isMoving: false
12-31 12:33:33.733 11408 12240 D TSLocationManager: [c.t.l.l.TSLocationManager a] Median accuracy: 5.0
12-31 12:33:33.734 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:33.734 11408 11408 D TSLocationManager: 🎾 2:9 [LocationRequestService startId: 4, eventCount: 2]
12-31 12:33:33.742 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService b]
12-31 12:33:33.742 11408 11408 D TSLocationManager: 🎾 STOP [LocationRequestService startId: 5, eventCount: 3]
12-31 12:33:33.742 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:33.742 11408 11408 D TSLocationManager: ⚙️︎ FINISH [LocationRequestService startId: 5, eventCount: 2, sticky: false]
12-31 12:33:33.744 11408 11802 I ReactNativeJS: 'location', { extras: {},
12-31 12:33:33.744 11408 11802 I ReactNativeJS: battery: { level: 1, is_charging: false },
12-31 12:33:33.744 11408 11802 I ReactNativeJS: activity: { confidence: 100, type: 'still' },
12-31 12:33:33.744 11408 11802 I ReactNativeJS: is_moving: false,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: uuid: '759d9e4f-a1b0-4af3-80a6-a5eec7c61d46',
12-31 12:33:33.744 11408 11802 I ReactNativeJS: age: 14,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: coords:
12-31 12:33:33.744 11408 11802 I ReactNativeJS: { age: 22,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: ellipsoidal_altitude: 0,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: altitude: 0,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: altitude_accuracy: 0.5,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: heading_accuracy: 30,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: heading: 264.31,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: speed: 37.8,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: accuracy: 5,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: longitude: -71.66896,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: speed_accuracy: 0.5,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: latitude: 6.18498 },
12-31 12:33:33.744 11408 11802 I ReactNativeJS: timestamp: '2024-12-31T12:33:33.720Z',
12-31 12:33:33.744 11408 11802 I ReactNativeJS: odometer: 14722096,
12-31 12:33:33.744 11408 11802 I ReactNativeJS: event: 'motionchange' }
12-31 12:33:33.746 11408 11802 I ReactNativeJS: '[motionchange]', { location:
12-31 12:33:33.746 11408 11802 I ReactNativeJS: { extras: {},
12-31 12:33:33.746 11408 11802 I ReactNativeJS: battery: { level: 1, is_charging: false },
12-31 12:33:33.746 11408 11802 I ReactNativeJS: activity: { confidence: 100, type: 'still' },
12-31 12:33:33.746 11408 11802 I ReactNativeJS: is_moving: false,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: uuid: '759d9e4f-a1b0-4af3-80a6-a5eec7c61d46',
12-31 12:33:33.746 11408 11802 I ReactNativeJS: age: 14,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: coords:
12-31 12:33:33.746 11408 11802 I ReactNativeJS: { age: 22,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: ellipsoidal_altitude: 0,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: altitude: 0,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: altitude_accuracy: 0.5,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: heading_accuracy: 30,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: heading: 264.31,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: speed: 37.8,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: accuracy: 5,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: longitude: -71.66896,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: speed_accuracy: 0.5,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: latitude: 6.18498 },
12-31 12:33:33.746 11408 11802 I ReactNativeJS: timestamp: '2024-12-31T12:33:33.720Z',
12-31 12:33:33.746 11408 11802 I ReactNativeJS: odometer: 14722096,
12-31 12:33:33.746 11408 11802 I ReactNativeJS: event: 'motionchange' },
12-31 12:33:33.746 11408 11802 I ReactNativeJS: isMoving: false }
12-31 12:33:33.752 11408 12240 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:33.752 11408 12240 D TSLocationManager: ⚙️︎ FINISH [LocationRequestService startId: 3, eventCount: 1, sticky: false]
12-31 12:33:33.753 11408 12241 I TSLocationManager: [c.t.l.l.TSLocationManager a]
12-31 12:33:33.753 11408 12241 I TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:33.753 11408 12241 I TSLocationManager: ║ getCurrentPosition LocationResult: 9 (32ms old)
12-31 12:33:33.753 11408 12241 I TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:33.753 11408 12241 I TSLocationManager: ╟─ 📍 Location[fused 6.184980,-71.668960 hAcc=5.0 et=+48m37s721ms alt=0.0 vAcc=0.5 vel=37.802036 sAcc=0.5 bear=264.30862 bAcc=30.0], time: 1735648413720
12-31 12:33:33.753 11408 12305 I TSLocationManager: [c.t.l.d.s.SQLiteLocationDAO persist]
12-31 12:33:33.753 11408 12305 I TSLocationManager: ✅ INSERT: 759d9e4f-a1b0-4af3-80a6-a5eec7c61d46
12-31 12:33:33.754 11408 12241 D TSLocationManager: [c.t.l.l.TSLocationManager a] Median accuracy: 5.0
12-31 12:33:33.754 11408 11408 D TSLocationManager: [c.t.l.g.TSGeofenceManager startMonitoringStationaryRegion]
12-31 12:33:33.754 11408 11408 D TSLocationManager: 🎾 Start monitoring stationary region (radius: 150.0m 6.18498,-71.66896 hAcc=5.0)
12-31 12:33:33.756 11408 12241 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:33.756 11408 12241 D TSLocationManager: ⚙️︎ FINISH [LocationRequestService startId: 4, eventCount: 0, sticky: false]
12-31 12:33:33.761 11408 12305 I TSLocationManager: [c.t.l.http.HttpService flush]
12-31 12:33:33.761 11408 12305 I TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:33.761 11408 12305 I TSLocationManager: ║ HTTP Service (count: 1)
12-31 12:33:33.761 11408 12305 I TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:33.771 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:33.771 11408 11408 D TSLocationManager: 🎾 motionchange [TrackingService startId: 1, eventCount: 1]
12-31 12:33:33.772 11408 11408 I TSLocationManager: [c.t.l.service.TrackingService k]
12-31 12:33:33.772 11408 11408 I TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:33.772 11408 11408 I TSLocationManager: ║ TrackingService motionchange: false
12-31 12:33:33.772 11408 11408 I TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:33.776 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:33.776 11408 11408 D TSLocationManager: ⚙️︎ FINISH [TrackingService startId: 1, eventCount: 0, sticky: false]
12-31 12:33:33.778 11408 11802 I ReactNativeJS: 'location', { extras: {},
12-31 12:33:33.778 11408 11802 I ReactNativeJS: battery: { level: 1, is_charging: false },
12-31 12:33:33.778 11408 11802 I ReactNativeJS: activity: { confidence: 100, type: 'still' },
12-31 12:33:33.778 11408 11802 I ReactNativeJS: is_moving: false,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: age: 34,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: uuid: 'e018f33e-bf8c-42e3-a0a2-81af331fa684',
12-31 12:33:33.778 11408 11802 I ReactNativeJS: odometer: 14722096,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: coords:
12-31 12:33:33.778 11408 11802 I ReactNativeJS: { age: 55,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: ellipsoidal_altitude: 0,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: altitude: 0,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: altitude_accuracy: 0.5,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: heading_accuracy: 30,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: heading: 264.31,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: speed: 37.8,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: accuracy: 5,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: longitude: -71.66896,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: speed_accuracy: 0.5,
12-31 12:33:33.778 11408 11802 I ReactNativeJS: latitude: 6.18498 },
12-31 12:33:33.778 11408 11802 I ReactNativeJS: timestamp: '2024-12-31T12:33:33.720Z' }
12-31 12:33:33.799 11408 11408 I TSLocationManager: [c.t.l.u.BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 3
12-31 12:33:33.808 11408 12305 D TSLocationManager: [c.t.l.d.s.SQLiteLocationDAO first]
12-31 12:33:33.808 11408 12305 D TSLocationManager: ✅ Locked 1 records
12-31 12:33:33.808 11408 12305 I TSLocationManager: [c.t.l.http.HttpService a]
12-31 12:33:33.808 11408 12305 I TSLocationManager: 🔵 HTTP POST: 759d9e4f-a1b0-4af3-80a6-a5eec7c61d46
12-31 12:33:33.959 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService f]
12-31 12:33:33.959 11408 11408 D TSLocationManager: ⚙️︎ LocationRequestService.stopSelfResult(5): true
12-31 12:33:33.959 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService onDestroy]
12-31 12:33:33.959 11408 11408 D TSLocationManager: 🔴 LocationRequestService stopped
12-31 12:33:33.978 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService f]
12-31 12:33:33.978 11408 11408 D TSLocationManager: ⚙️︎ TrackingService.stopSelfResult(1): true
12-31 12:33:33.978 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService onDestroy]
12-31 12:33:33.978 11408 11408 D TSLocationManager: 🔴 TrackingService stopped
12-31 12:33:34.316 11408 12311 I TSLocationManager: [c.t.l.http.HttpService$f onResponse]
12-31 12:33:34.316 11408 12311 I TSLocationManager: 🔵 Response: 201
12-31 12:33:34.317 11408 12311 D TSLocationManager: [c.t.l.d.s.SQLiteLocationDAO destroy]
12-31 12:33:34.317 11408 12311 D TSLocationManager: ✅ DESTROY: 759d9e4f-a1b0-4af3-80a6-a5eec7c61d46
12-31 12:33:34.326 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:34.326 11408 11408 D TSLocationManager: 🎾 start [ActivityRecognitionService startId: 1, eventCount: 1]
12-31 12:33:34.326 11408 12305 D TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
12-31 12:33:34.326 11408 12305 D TSLocationManager: 🚘 ️DetectedActivity [type=STILL, confidence=100]
12-31 12:33:34.329 11408 12305 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:34.329 11408 12305 D TSLocationManager: ⚙️︎ FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false]
12-31 12:33:34.333 11408 12311 I TSLocationManager: [c.t.l.u.BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 3
12-31 12:33:34.531 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService f]
12-31 12:33:34.531 11408 11408 D TSLocationManager: ⚙️︎ ActivityRecognitionService.stopSelfResult(1): true
12-31 12:33:34.531 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService onDestroy]
12-31 12:33:34.531 11408 11408 D TSLocationManager: 🔴 ActivityRecognitionService stopped
12-31 12:33:34.731 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:34.731 11408 11408 D TSLocationManager: 🎾 2:9 [LocationRequestService startId: 1, eventCount: 1]
12-31 12:33:34.732 11408 12305 I TSLocationManager: [c.t.l.l.TSLocationManager a]
12-31 12:33:34.732 11408 12305 I TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:34.732 11408 12305 I TSLocationManager: ║ getCurrentPosition LocationResult: 9 (10ms old)
12-31 12:33:34.732 11408 12305 I TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:34.732 11408 12305 I TSLocationManager: ╟─ 📍 Location[fused 6.184978,-71.668988 hAcc=5.0 et=+48m38s723ms alt=0.0 vAcc=0.5 vel=29.15201 sAcc=0.5 bear=265.08038 bAcc=30.0], time: 1735648414722
12-31 12:33:34.733 11408 12305 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
12-31 12:33:34.733 11408 12305 I TSLocationManager: 🔵 Acquired current position
12-31 12:33:34.733 11408 12305 D TSLocationManager: [c.t.l.l.TSLocationManager a] Median accuracy: 5.0
12-31 12:33:34.735 11408 12305 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:34.735 11408 12305 D TSLocationManager: ⚙️︎ FINISH [LocationRequestService startId: 1, eventCount: 0, sticky: false]
12-31 12:33:34.740 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService b]
12-31 12:33:34.740 11408 11408 D TSLocationManager: 🎾 STOP [LocationRequestService startId: 2, eventCount: 1]
12-31 12:33:34.740 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService a]
12-31 12:33:34.740 11408 11408 D TSLocationManager: ⚙️︎ FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: false]
12-31 12:33:34.742 11408 11802 I ReactNativeJS: 'location', { extras: {},
12-31 12:33:34.742 11408 11802 I ReactNativeJS: battery: { level: 1, is_charging: false },
12-31 12:33:34.742 11408 11802 I ReactNativeJS: activity: { confidence: 100, type: 'still' },
12-31 12:33:34.742 11408 11802 I ReactNativeJS: is_moving: false,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: age: 12,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: uuid: 'c2b6b64e-ff41-49c3-8c5e-d4c98cd3e5c6',
12-31 12:33:34.742 11408 11802 I ReactNativeJS: odometer: 14722096,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: coords:
12-31 12:33:34.742 11408 11802 I ReactNativeJS: { age: 13,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: ellipsoidal_altitude: 0,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: altitude: 0,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: altitude_accuracy: 0.5,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: heading_accuracy: 30,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: heading: 265.08,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: speed: 29.15,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: accuracy: 5,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: longitude: -71.6689877,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: speed_accuracy: 0.5,
12-31 12:33:34.742 11408 11802 I ReactNativeJS: latitude: 6.1849777 },
12-31 12:33:34.742 11408 11802 I ReactNativeJS: timestamp: '2024-12-31T12:33:34.722Z' }
12-31 12:33:34.942 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService f]
12-31 12:33:34.942 11408 11408 D TSLocationManager: ⚙️︎ LocationRequestService.stopSelfResult(2): true
12-31 12:33:34.942 11408 11408 D TSLocationManager: [c.t.l.service.AbstractService onDestroy]
12-31 12:33:34.942 11408 11408 D TSLocationManager: 🔴 LocationRequestService stopped
12-31 12:33:39.548 11408 12305 I TSLocationManager: [c.t.l.scheduler.ScheduleEvent a]
12-31 12:33:39.548 11408 12305 I TSLocationManager: ╔═════════════════════════════════════════════
12-31 12:33:39.548 11408 12305 I TSLocationManager: ║ ⏰ OneShot event fired: TERMINATE_EVENT
12-31 12:33:39.548 11408 12305 I TSLocationManager: ╠═════════════════════════════════════════════
12-31 12:33:39.548 11408 12305 D TSLocationManager: [c.t.l.event.TerminateEvent$a onChange]
12-31 12:33:39.548 11408 12305 D TSLocationManager: ℹ️ TERMINATE_EVENT ignored (MainActivity is still active).

@Borges53
Copy link
Author

When I press the switch it turns itself off, what could be happening?

@christocracy
Copy link
Member

What makes you think it “turned itself off”?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants