Search code examples
javaandroidgoogle-apigoogle-fit

Google Fit Listen for Data Updates not working


I'm trying to implement a Google Fit Listener when data is updated into Google Fit services.

In this link of Google Fit documentation there is a simple example, however, it is not 100% clear. For that reason, I have two problems:

  1. I don't know how to implement mResultCallback variable (there aren't any examples in this documentation).
  2. When I define a simple ResultCallback (it seems to work but I'm not sure) and I launch the application, it gives me a result error code: java.lang.SecurityException: Signature check failed

Solution

  • The code within the HistortyApi lists one of android.permission.ACCESS_FINE_LOCATION or android.permission.BODY_SENSORS as being required.

    Adding those permissions to my code hasn't resolved the same problem though.

    Confirmed bug in Google Fit services. See discussion in https://plus.google.com/110141422948118561903/posts/Lqri4LVR7cD