2016-12-01 6 views
0

私はコーディングに新しいので、可能な限り明確なものを完全に理解していない可能性があるので、具体的に答えてください:)Google Fitデータセットをグラフに表示するにはどうすればよいですか?

私はGoogle Fit APIから取得した一連のデータをグラフ(何も考えていないので、単純なものを提案することができます) 私はAndroidスタジオ2.2を使用しています

私は過去7日間のデータセットをログに記録しましたが、に。私はあなたが私の内包を得ることを願ってい

I/BasicHistoryApi:Number of returned buckets of DataSets is: 7 
I/BasicHistoryApi: Data returned for Data type: com.google.step_count.delta 
I/BasicHistoryApi: Data point: 
I/BasicHistoryApi: Type: com.google.step_count.delta 
I/BasicHistoryApi: Start: 12:01:46 
I/BasicHistoryApi: End: 11:47:10 
I/BasicHistoryApi: Field: steps Value: 6844 

private static void dumpDataSet(DataSet dataSet) { 
     Log.i(TAG, "Data returned for Data type: " + dataSet.getDataType().getName()); 
     DateFormat dateFormat = getTimeInstance(); 
     TextView textView; 

     for (DataPoint dp : dataSet.getDataPoints()) { 
      Log.i(TAG, "Data point:"); 
      Log.i(TAG, "\tType: " + dp.getDataType().getName()); 
      Log.i(TAG, "\tStart: " + dateFormat.format(dp.getStartTime(TimeUnit.MILLISECONDS))); 
      Log.i(TAG, "\tEnd: " + dateFormat.format(dp.getEndTime(TimeUnit.MILLISECONDS))); 
      for(Field field : dp.getDataType().getFields()) { 
       Value val = dp.getValue(field); 
       String fieldName = field.getName(); 
       Log.i(TAG, "\tField: " + field.getName() + 
         " Value: " + dp.getValue(field)); 
      } 
     } 
    } 

ログは7日(下記1つのデータセット)のためのデータセットを出します。 ありがとうございます。あらかじめありがとうございます:)

答えて

関連する問題