Skip to main content
Version: v1.0

hmSetting.getUserData()

Gets the user data.

All properties are 0 when no data is fetched.

Type

() => userData

Parameters

userData: object

PropertyDescriptionType
ageThe user's age, or 0 when there is no datanumber
heightThe user's height, a floating-point number, or 0 when there is no datanumber
weightThe user's weight, in floating point numbers, or 0 when there is no datanumber
gender0: MALE, 1: FEMALE, 2: UNSPECIFIEDboolean
nickNameuser nicknamestring
regionUser registration area (ISO standard)string

Code example

const age = hmSetting.getUserData().age
const height = hmSetting.getUserData().height
const weight = hmSetting.getUserData().weight
const gender = hmSetting.getUserData().gender
const nickName = hmSetting.getUserData().nickName