コード例 #1
0
        @Override
        public void onDataReceived(DataReadResult dataReadResult) {
          // GoogleApiSubscription.printData(dataReadResult);

          Log.d(TAG, "Received generic result");
          if (dataReadResult.getDataSets().size() > 0) {
            // Go through the requested data types
            Bundle bundle = formatActivity(dataReadResult);
          }
        }
コード例 #2
0
ファイル: MainActivity.java プロジェクト: EduEguren/IkasFit
  // Una vez obtenidos los datos los subimos a parse
  private void uploadData(DataReadResult dataReadResult) {

    // [START parse_read_data_result]
    // If the DataReadRequest object specified aggregated data, dataReadResult will be returned
    // as buckets containing DataSets, instead of just DataSets.
    if (dataReadResult.getBuckets().size() > 0) {
      for (Bucket bucket : dataReadResult.getBuckets()) {
        List<DataSet> dataSets = bucket.getDataSets();
        for (DataSet dataSet : dataSets) {
          dumpDataSet(dataSet);
        }
      }
    } else if (dataReadResult.getDataSets().size() > 0) {
      for (DataSet dataSet : dataReadResult.getDataSets()) {
        dumpDataSet(dataSet);
      }
    }
    // [END parse_read_data_result]

  }