CLASS info |
|---|
public class SettingManager |
Provides the setting-related functions. |
Constructor name |
|---|
SettingManager() Builder for SettingManager. |
Return | Method |
|---|---|
PendingResult<Status> | disableHiHealth(HiHealthKitClient client) Disables the HUAWEI Health Kit function. |
PendingResult<DataTypeResult> | addDataType(HiHealthKitClient client, DataTypeAddOptions options) Creates and adds a customized data type. |
PendingResult<DataTypeResult> | readDataType(HiHealthKitClient client, String dataTypeName) Reads the corresponding customized data type based on the data type name. |
Method |
|---|
public PendingResult<Status> disableHiHealth(HiHealthKitClient client) |
Disables the Health Kit function, cancels user authorization, and cancels all data records. (The task takes effect in 24 hours.) |
Parameters
Parameter name | Parameter desc |
|---|---|
client | Connected HiHealthKitClient instance object. |
Method |
|---|
public PendingResult<DataTypeResult> addDataType(HiHealthKitClient client, DataTypeAddOptions options) |
Creates and adds a customized data type. The name of the created data type must be prefixed with the package name of the app. Otherwise, the creation fails. |
Parameters
Parameter name | Parameter desc |
|---|---|
client | Connected HiHealthKitClient instance object. |
options | Request options for creating the data type. |
Method |
|---|
public PendingResult<DataTypeResult> readDataType(HiHealthKitClient client, String dataTypeName) |
Reads the data type based on the data type name. This method is used to read the customized data types of the app. |
Parameters
Parameter name | Parameter desc |
|---|---|
client | Connected HiHealthKitClient instance object. |
dataTypeName | Data type name. |