目录

Session

Class Info

public class Session

Session of a message.

Public Method Summary

Qualifier and Type

Method Name

void

setMessageName(String messageName)

void

setMessageId(String messageId)

void

setDeviceModel(String deviceModel)

void

setDeviceCategory(String deviceCategory)

void

setDeviceName(String deviceName)

void

setPackageName(String packageName)

Public Methods

[h2]setMessageName

Method

public void setMessageName(String messageName)

Sets the message name.

Parameters

Name

Description

messageName

Message name. For example:

featurePrediction, which indicates feature prediction.

[h2]setMessageId

Method

public void setMessageId(String messageId)

Sets the message ID.

Parameters

Name

Description

messageId

Message ID, consisting of eight digits. When a message is sent again, its ID should remain unchanged.

[h2]setDeviceModel

Method

public void setDeviceModel(String deviceModel)

Sets the device model.

Parameters

Name

Description

deviceModel

Model of the device where the donated data is from. Example: MHA-AL00. You are advised to pass this parameter.

[h2]setDeviceCategory

Method

public void setDeviceCategory(String deviceCategory)

Sets the device category.

Parameters

Name

Description

deviceCategory

Category of the device where the donated data is from. Example:

phone: mobile phone (including the telematics equipment)

pad: tablet

hd: HUAWEI Vision

mhd: mobile Vision product (speaker with a screen)

speaker: speaker without a screen

intelligentWatch: smart watch

sportWatch: sports watch

glasses: glasses

builtinCar: built-in telematics equipment

externalCar: external telematics equipment

[h2]setDeviceName

Method

public void setDeviceName(String deviceName)

Sets the device name.

Parameters

Name

Description

deviceName

Device name, which can be found in the system settings.

[h2]setPackageName

Method

public void setPackageName(String packageName)

Sets the app package name.

Parameters

Name

Description

packageName

App package name. The parameter value is set by the Awareness SDK, so you do not need to set it.