Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions mobile/tasks/location.task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,22 @@ export class OBackgroundLocationService {
}

this.locationSubscription = BackgroundGeolocation.onLocation(
async (location) => {
(location) => {
Sentry.captureMessage(
`Captured locationUpdate in location service: ${JSON.stringify(location?.coords)}`,
);
await this.saveLocation(

// TODO: we might want to include altitude in future too?
this.saveLocation(
location?.coords?.latitude,
location?.coords?.longitude,
); // TODO: we might want to include altitude in future too?
).catch((error) => {
Sentry.captureException(error, {
tags: { location_service: "saveLocation:fail" },
});
});
},
async (error) => {
(error) => {
Sentry.captureException(error, {
tags: { location_service: "onLocation:onFailure" },
});
Expand Down
Loading