Issues with Android 16
Hi people, ever since GrapheneOS updated to Android 16, OwnTracks stopped working properly. It will only update my location whenever I open the app.
I know this sounds like a battery optimization thing, however I double-checked that the background usage was set to unrestricted and the option to pause the app when unused was deactivated.
I have no idea what to do or how to debug this problem.
Here's my configuration:
{
"_type" : "configuration",
"_id" : "myid",
"waypoints" : [ ],
"_build" : 420504022,
"autostartOnBoot" : true,
"cleanSession" : false,
"clientId" : "myclientid",
"cmd" : true,
"connectionTimeoutSeconds" : 30,
"debugLog" : false,
"deviceId" : "mydeviceid",
"discardNetworkLocationThresholdSeconds" : 0,
"enableMapRotation" : false,
"encryptionKey" : "",
"experimentalFeatures" : [ ],
"extendedData" : true,
"fusedRegionDetection" : true,
"host" : "mydomain.org",
"ignoreInaccurateLocations" : 0,
"ignoreStaleLocations" : 0.0,
"info" : true,
"keepalive" : 60,
"locatorDisplacement" : 500,
"locatorInterval" : 60,
"mapLayerStyle" : "OpenStreetMapNormal",
"mode" : 0,
"monitoring" : 1,
"moveModeLocatorInterval" : 10,
"mqttProtocolLevel" : 3,
"notificationEvents" : true,
"notificationGeocoderErrors" : true,
"notificationHigherPriority" : false,
"notificationLocation" : true,
"opencageApiKey" : "",
"osmTileScaleFactor" : 1.0,
"password" : "XxXxXxXx",
"pegLocatorFastestIntervalToInterval" : false,
"ping" : 15,
"port" : 1883,
"pubQos" : 1,
"pubRetain" : true,
"pubTopicBase" : "owntracks/%u/%d",
"publishLocationOnConnect" : true,
"remoteConfiguration" : false,
"reverseGeocodeProvider" : "Device",
"showRegionsOnMap" : true,
"sub" : true,
"subQos" : 2,
"subTopic" : "owntracks/+/+",
"theme" : "Auto",
"tid" : "id",
"tls" : false,
"tlsClientCrt" : "",
"username" : "myusername",
"ws" : false
}
I have been experiencing this on both iOS and Android. I have no idea what the issue could be though considering it is both OS's.
Both are using MQTT as the backend.
I can make another issue on the iOS repo as well, but I am also unsure how to debug this issue. Everything in the logs says it is essentially working. Has been working for a while and now is just broken and only updates the locations if you are on the app.
I suspect it might have something to do with network changes for both iOS and Android, as the client seems to work fine if you open the app on roaming data, publish, exit the app/lock screen, drive somewhere and connect to a public wifi or something, then drive back. It will show the last location was at the place with the public wifi and the Status shows 0 queued endpoints waiting to publish.
Edit: iOS is having no issues. There was a configuration problem on my end.
Same here w/ GrapheneOS. It seems like it just started after QPR1 was installed. Never had issues before QPR1.
It seems related to a GPS change in QPR1, is my guess. If I have the OT app open and in significant changes mode it will update as expected every 90 seconds (what I have it set to). If I have the app not in the foreground, it won't send updates. If I have a maps app open (e.g., MagicEarth), it works as expected updating every 90 seconds as well. If I close the maps app, it won't send anymore updates.
After I open OT and go into the logs after it hasn't updated for a while, I'll see:
W [main] MapViewModel: no location available D [main] OSMMapFragment: OSMMapFragment initMap locationEnabled=true D [main] MapActivity: Checking and requesting notification permissions D [main] MapActivity: Checking and requesting location permissions D [main] MapActivity: Has location permissions D [main] MapActivity: Check and request location services D [main] BackgroundService: no intent or action provided, setting up location request and scheduling location ping.
and then it will update after that (since the app is open, apparently).