Closed mstidham closed 6 years ago
@bengtan isn't this related to background fetch hack (and even that may not even solve this) due to iOS not allowing location tracking when app is suspended. Nonetheless, lets explore options.
This ticket is a bit confusing. Let me give some information first.
1.
The client (both Staging and Prod) uses a library react-native-background-geolocation (sometimes 'rnbgl') to send location updates from the client to the server. Due to iOS and other factors, this library only sends updates when the phone is moving, or has significantly changed location.
If the phone is stationary, this library does not send updates. In fact, if the phone is stationary, the phone has to move about 200m-ish before rnbgl even wakes up (to send an update).
(Also, despite the name 'react-native-background-geolocation', it also operates when the app is in the foreground as well. But I don't think this point is significant for this ticket.)
This is enabled for both Staging and Prod, and has been in the client for a long time (ie. 2.4.x or before).
We are also (attempting) implementing regular periodic location updates from the client to the server, even when the phone is stationary. We refer to this as 'background-fetch' because it's using the background-fetch feature of iOS.
This one is trickier and is still in an experimental stage.
This one is enabled for (debugging for) Staging. It is not (shouldn't be?) enabled for Production.
Despite the similarities in name, they are two completely different techniques.
As I read the ticket, I think you guys are talking about 1, not 2. But even then, it's not clear.
Observed Result: It appears that users are not getting location updates at times.
What is 'users are not getting location updates'?
The app on the device doesn't 'get' location data points from the server. It sends location data points to the server.
The only way the app can get location data points from the server is if you're using the location debugging feature (only on the Staging app).
Please clarify.
Expected Result: User should receive push notifications/location updates when app is in killed state.
Push notifications and location updates are two different things. Is this ticket about push notifications or location updates?
Please clarify.
I think maybe some more testing (or thinking) is in order, in order to disambiguate?
isn't this related to background fetch hack
If, by 'background fetch', you're referring to 2, then: No, it shouldn't be running on Prod.
But I think you're confusing 1 and 2. Please read my immediately preceding comment above.
Oh, also, for 1, I vaguely remember that, maybe, ... background location doesn't work if the app is not in memory (ie. killed). It works if you start the app and then background it. It stops working work if you kill the app.
BUT
I think @southerneer made some change so the app 'auto-starts' so that if you kill the app, it will restart, hence, enabling background location to work.
My memory is faulty. @southerneer will have to clarify.
Nope, didn't make any 'auto-start' changes. I'm not positive what happens with rnbgl after killing the app, but in general killing the app is a drastic step and signals to iOS that all bets are off. I wouldn't be surprised if rnbgl stops working "normally" after a kill.
I believe we must close it - it is out of our control to support functionality after app kill
+1 for closing ... but in my case, my reason is: 'insufficient information or clarity'.
Came across this ticket whilst cleaning out my inbox.
After having done some work on #2508, I believe this is a duplicate of #2508.
Oh, also, for the record, the app does upload location even after an app kill.
Users location not updating
Observed Result: It appears that users are not getting location updates at times. This issue is not consistent and has not been reproduced successfully on Staging. Don, Miranda & Steve have experienced this on Production.
Issue 1: user@don was showing within bot "Home Sweet Home" although he was 10 miles from the bot. Opening the app and doing a kill/reload did not correct this issue. Deleting the app and reinstall corrected this issue.
Issue 2: user@don created a bot "Cross Timbers Construction" and received push notification when he left the bot radius but when he returned to bot location hours later he did not receive an arrival push notification or show within the bot. Opening the app usually updates the location in this case. @miranda was able to reproduce this issue.
Expected Result:
User should receive push notifications/location updates when app is in killed state.
Steps to reproduce:
Related Screenshots/Video Links: