digidem / comapeo-mobile

The next version of Mapeo mobile
GNU General Public License v3.0
5 stars 1 forks source link

Fixes crash when permission is taken away. #851

Closed cimigree closed 1 week ago

cimigree commented 1 week ago

closes #848

Description

ErikSin commented 1 week ago

This fixes the crash but compromises the data integrity. If it is still able to take a track while the location service is off, the track will not be accurate. Obviously the app crashing was not ideal, but we need a way of catching the crash and doing something instead of just ignoring it and continuing on

cimigree commented 1 week ago

@ErikSin I don't think there is a crash though... And that error is a real error. The startDate is not being read as a date. So I am not clear what you mean or what to do next.

ErikSin commented 1 week ago

So previously if the user turned off their permission the app would crash. This behaviour meant that tracks would stop tracking (as well as blow up the entire app). With your current fix, the app doesn't crash anymore BUT tracking still remains. If the user was turn it back on, it would create a straight line from the last point to the new point once it has been turned back on. This is not ideal behaviour as now we are creating a false straight line and effecting the integrity of the data.

So we need to find an inbetween where the app does not crash, BUT it should turn off tracks.