deltachat-android
deltachat-android copied to clipboard
Location streaming does not work
When I enable location streaming, green location icon appears briefly in the status bar and then disappears. It seems this way no location is actually obtained unless I also run another app such as Organic Maps that properly requests location, because GPS does not have enough time to obtain even a single measurement.
When I start recording the track with Organic Maps with "Record track" feature, it constantly shows that app is accessing location in the status bar. I think Delta Chat should do the same.
I am testing with Android 14. I have location permission "Allowed all the time" for the app.
Our location code is at https://github.com/deltachat/deltachat-android/tree/main/src/main/java/org/thoughtcrime/securesms/geolocation Android documentation for reference is at https://developer.android.com/develop/sensors-and-location/location/request-updates
Copy-pasting @adbenitez chat message regarding location permission and Google: " I am also suspecting they will come back asking to remove background location permission, which is not really needed, they recommend using foreground location service/notification for our use-case and anyways the way we do it is currently completely broken "
I am also suspecting they will come back asking to remove background location permission, which is not really needed
but it is needed for the idea we have with location streaming, or?
No, google has weird concepts of what "background" really means, but it makes sense in the end, because they want a permanent notification with location type which is considered a FOREGROUND service even if the app is in background, and hence you don't need background service which is more like silently and suspiciously using location without user awareness,
the permanent notification makes sense so user is reminded they are sharing location to some chat, it could have a STOP button and then we could also allow streaming for longer periods as then user is more aware, as a side effect this is also helps to keep the app working in background without system killing it