Closed Guardiola31337 closed 7 years ago
Thanks for the detailed report, it's very helpful and greatly appreciated. I'm not able to reproduce this exactly, what I see is a noticeable delay receiving any locations after switching providers. Would you mind retesting and letting the app sit for a while after switching from None
to Lost
to see if you too eventually get a location update?
What causes the delay is that we aren't clearing cached ReportedChanges
for each listener when it is removed from LostClientManager
. So in this case, when you resubscribe, we receive notifications from the engine but don't notify your listener (https://github.com/mapzen/lost/blob/master/lost/src/main/java/com/mapzen/android/lost/internal/LostClientManager.java#L307). Removing reported changes for each listener/pending intent/callback when it is removed from the manager will solve this. Expect a PR shortly.
I haven't hit the DeadObjectException
but will look into it more.
Happening the same.
Description
Noting that after ☝️ you don't receive any location updates either even if you navigate between the different activities of the app (setting no engine when
onPause
and restoring it whenonResume
). The only way that I found to receive again the location update (only once as described above) was to force stop the app.Steps to Reproduce
You can reproduce the behavior described above running the test app included in this branch https://github.com/mapbox/mapbox-java/tree/pg-lost-issue following the steps 👇
Location engine
activity exampleLost
as location provider (Description's step 1)None
as location provider (Description's step 3)Lost
as location provider (Description's step 4)Lost & Android Version
Lost
3.0.3
Moto X 2nd gen Android 5.0 Nexus 5 Android 6.0During testing I hit a
DeadObjectException
(👀 https://github.com/mapzen/lost/issues/218) but I'm not sure if it could be related to this one (maybe crashing silently?). Sadly I don't have a reproducible use-case. https://github.com/mapzen/lost/issues/221 seems related too.