com.samsung.android.sdk.healthdata
Interface HealthResultHolder<T extends HealthResultHolder.BaseResult>
-
public interface HealthResultHolder<T extends HealthResultHolder.BaseResult>
This interface representing the result of invoking method.- Since:
- 1.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static class
HealthResultHolder.BaseResult
This class defines basic information that includes the status of a request.static interface
HealthResultHolder.ResultListener<T extends HealthResultHolder.BaseResult>
This interface is a callback to receive a result for the health data request asynchronously.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description T
await()
Blocks the thread until the task is completed.void
cancel()
Deprecated.void
setResultListener(HealthResultHolder.ResultListener<T> callback)
Sets the callback to get the result asynchronously.
-
-
-
Method Detail
-
await
T await()
Blocks the thread until the task is completed. It's used to make the synchronous request for health data.
The synchronous request has to be used only if it would not occur NRA (no response of application).
If it's not sure, use the asynchronous request withsetResultListener(HealthResultHolder.ResultListener)
.Refer to an example to read health data synchronously.
- Returns:
- The result status
- Throws:
IllegalStateException
- If this method is called on the main thread- Since:
- 1.0.0
- See Also:
setResultListener(HealthResultHolder.ResultListener)
-
cancel
void cancel()
Deprecated.Cancels the request. It doesn't give a callback event.- Since:
- 1.0.0
-
setResultListener
void setResultListener(HealthResultHolder.ResultListener<T> callback)
Sets the callback to get the result asynchronously. Refer to an example to read health data asynchronously.- Parameters:
callback
- The callback to be invoked.- Since:
- 1.0.0
-
-