目录

SettingManager

CLASS info

public class SettingManager

Provides the setting-related functions.

Public Constructor Summary

Constructor name

SettingManager()

Builder for SettingManager.

Public Method Summary

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.

Public Methods

[h2]disableHiHealth(HiHealthKitClient client)

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.

[h2]addDataType(HiHealthKitClient client, DataTypeAddOptions options)

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.

[h2]readDataType(HiHealthKitClient client, String dataTypeName)

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.