• Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Hyperloop
    • Labels:


      While trying to access Google Fit History data, the onSuccess is called, but the DataReadResponse methods can't be successfully called to retrieve data.

      Test code:

      Fitness.getHistoryClient(windowActivity, GoogleSignIn.getLastSignedInAccount(windowActivity))
              .readData(new DataReadRequest.Builder()
                  // The data request can specify multiple data types to return, effectively
                  // combining multiple data queries into one call.
                  // In this example, it's very unlikely that the request is for several hundred
                  // datapoints each consisting of a few steps and a timestamp.  The more likely
                  // scenario is wanting to see how many steps were walked per day, for 7 days.
                  .aggregate(DataType.TYPE_STEP_COUNT_DELTA, DataType.AGGREGATE_STEP_COUNT_DELTA)
                  // Analogous to a "Group By" in SQL, defines how data should be aggregated.
                  // bucketByTime allows for a time span, whereas bucketBySession would allow
                  // bucketing by "sessions", which would need to be defined in code.
                  .bucketByTime(1, TimeUnit.DAYS)
                  .setTimeRange(startTime, endTime, TimeUnit.MILLISECONDS)
              .addOnSuccessListener(new OnSuccessListener({
                  onSuccess: function(e) {
                      var dataResponse = new DataReadResponse(e);
                      console.log("onSuccess()" + e.toString() + "/" + dataResponse.toString());
                      console.log("buckets size: " + dataResponse.getDataSets().size());
              .addOnFailureListener(new OnFailureListener({
                  onFailure: function(e) {

      This error is happening
      [INFO] onSuccess()

      [WARN] W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List' on a null object reference
      [WARN] W/System.err: at Source:6)
      [WARN] W/System.err: at java.lang.reflect.Method.invoke(Native Method)
      [WARN] W/System.err: at hyperloop.BaseProxy.invokeMethod(
      [WARN] W/System.err: at hyperloop.InstanceProxy.invokeMethod(
      [WARN] W/System.err: at hyperloop.BaseProxy.callNativeFunction(
      [WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
      [WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(
      [WARN] W/System.err: at
      [WARN] W/System.err: at hyperloop.HyperloopInvocationHandler.invoke(
      [WARN] W/System.err: at java.lang.reflect.Proxy.invoke(
      [WARN] W/System.err: at $Proxy0.onSuccess(Unknown Source)
      [WARN] W/System.err: at Source:27)
      [WARN] W/System.err: at android.os.Handler.handleCallback(
      [WARN] W/System.err: at android.os.Handler.dispatchMessage(
      [WARN] W/System.err: at android.os.Looper.loop(
      [WARN] W/System.err: at
      [WARN] W/System.err: at java.lang.reflect.Method.invoke(Native Method)
      [WARN] W/System.err: at$
      [WARN] W/System.err: at




            • Assignee:
     Yanko Valera
            • Watchers:
              1 Start watching this issue


              • Created:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  Sync status:
                  Last received:
                  Last sent:

                  Git Integration