aranja/rakning-c19-app

Better detection on Android if GPS is disabled.

Closed this issue · 1 comments

The notification indicates that tracking is happening, even if the user has disabled GPS. Optimally, we should prompt the user to turn on the GPS for tracking to work.

There are two parts to this issue:

  1. How do we detect that GPS is disabled on Android?
  2. How do we update the notification in the background?

For #2, we need to figure out the lifecycle of the React Native app on Android, and if we can put this logic there. Otherwise, we need to add this to the native code somewhere.

#52 has a fix for the first part, but it requires the user to open the app.

The second part is more tricky, since the JS app shuts off eventually, and we don't own the native code that controls the notification.

We might want to fork and extend the background-geolocation plugin. Or implement some kind of scheduled task that checks the status of data collection and notifies the user of issues with local notifications.

Though I probably won't have time to do more work on this.