googlearchive / android-fit

Migrated:

Home Page:https://github.com/android/fit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OnDataPointListener Stops getting updates randomly?

RyanNewsom opened this issue · comments

commented

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

🙏

commented

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!