com.samsung.android.sdk.healthdata
Interface HealthResultHolder.ResultListener<T extends HealthResultHolder.BaseResult>
-
- Enclosing interface:
- HealthResultHolder<T extends HealthResultHolder.BaseResult>
public static interface HealthResultHolder.ResultListener<T extends HealthResultHolder.BaseResult>
This interface is a callback to receive a result for the health data request asynchronously.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
onResult(T result)
Called when the result is ready.
-
-
-
Method Detail
-
onResult
void onResult(T result)
Called when the result is ready.- Parameters:
result
- The result for the health data request. You can check the result as below.private static final String APP_TAG = "MyApp"; private final HealthResultHolder.ResultListener<HealthDataResolver.ReadResult> mRdResult = new HealthResultHolder.ResultListener<HealthDataResolver.ReadResult>(){ @Override public void onResult(HealthDataResolver.ReadResult result) { try { Iterator<HealthData> iterator = result.iterator(); if (iterator.hasNext()) { HealthData data = iterator.next(); float glucoseValue = data.getFloat(HealthConstants.BloodGlucose.GLUCOSE); } } finally { result.close(); } } };
- Since:
- 1.0.0
-
-