OnDataPointListener Stops getting updates randomly?
RyanNewsom opened this issue · comments
All,
My team noticed this problem in our application which uses your Sensors API to show users their distance traveled. Every time we start a walk, eventually, the OnDataPointListener just stops giving updates that there's a new DataPoint available(even though user is moving). I've seen it take anywhere from 5 mins to 1.5 hours to stop working. We have log statements tracking when theres an update, when the client gets disconnected(if it ever does), when a client gets built, etc. There is no callback when this happens. I forked your sample app to try and see if this was an API issue, and it looks like it is.
https://github.com/RyanNewsom/android-fit/tree/master/BasicSensorsApi
Steps to reproduce:
- Download my sample app, launch, press start.
- Confirm updates are coming in
- Background the app, hit the hold button to turn off the screen
- Put phone in pocket/on a table for 10-30 mins
- Foreground app and walk around of shake the phone to see if you are getting updates
- repeat 3-5 until you see you are not getting updates
🙏
Today I did some testing and I see a lot of this in logcat...... I'm sure this is whats causing the issue.
07-26 15:11:18.199 5057-30645/? I/Fitness: Found dead listener BinderListener{app.package.name d:distance.delta:gms:SM-G920V:180badfa:live_distance_from_steps android.os.BinderProxy@fa2a5e2}, removing.
I am closing this issue/PR, as it has been migrated to the new repo linked above in the comments. Thank you!