fit-samples icon indicating copy to clipboard operation
fit-samples copied to clipboard

OnDataPointListener Stops getting updates randomly?

Open codingjeremy opened this issue 6 years ago • 1 comments

Issue by RyanNewsom Friday Jul 22, 2016 at 22:52 GMT Originally opened as https://github.com/googlesamples/android-fit/issues/17


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:

  1. Download my sample app, launch, press start.
  2. Confirm updates are coming in
  3. Background the app, hit the hold button to turn off the screen
  4. Put phone in pocket/on a table for 10-30 mins
  5. Foreground app and walk around of shake the phone to see if you are getting updates
  6. repeat 3-5 until you see you are not getting updates

🙏

codingjeremy avatar Sep 10 '19 20:09 codingjeremy

Comment by RyanNewsom Tuesday Jul 26, 2016 at 21:30 GMT


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.

codingjeremy avatar Sep 10 '19 20:09 codingjeremy