We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

ActivityConversionInfo

Expand

Class Info

public class ActivityConversionInfo implements Parcelable, IMessageEntity

Activity conversion information.

The following sample code obtains an ActivityConversionInfo instance:
Java
Kotlin
ActivityConversionInfo.Builder activityTransition = new ActivityConversionInfo.Builder();
activityTransition.setActivityType(activityType);
activityTransition.setConversionType(conversionType);
ActivityConversionInfo activityConversionInfo = activityTransition.build();
val activityTransition = ActivityConversionInfo.Builder()
activityTransition.setActivityType(activityType)
activityTransition.setConversionType(conversionType)
val activityConversionInfo = activityTransition.build()

Nested Class Summary

Expand

Qualifier and Type

Class Name and Description

public static class

ActivityConversionInfo.Builder

Builds an ActivityConversionInfo instance.

Public Field Summary

Expand

Qualifier and Type

Field and Description

static final Creator<ActivityConversionInfo>

CREATOR

Used to deserialize activity conversion information.

static final int

ENTER_ACTIVITY_CONVERSION

A user enters the specified activity. The value is 0.

static final int

EXIT_ACTIVITY_CONVERSION

A user exits the specified activity. The value is 1.

Public Constructor Summary

Expand

Constructor Name

ActivityConversionInfo()

Builds an ActivityConversionInfo instance.

ActivityConversionInfo(int activityType, int conversionType)

Builds an ActivityConversionInfo instance.

Public Method Summary

Expand

Qualifier and Type

Method Name and Description

int

getActivityType()

Obtains the activity type of the current activity conversion instance.

int

getConversionType()

Obtains the conversion type of the current activity conversion instance.

void

setActivityType(int activityType)

Sets the activity type of the current activity conversion instance.

void

setConversionType(int conversionType)

Sets the conversion type of the current activity conversion instance.

Public Fields

CREATOR

Expand

Fields

public static final Creator<ActivityConversionInfo> CREATOR

Used to deserialize activity conversion information.

ENTER_ACTIVITY_CONVERSION

Expand

Fields

public static final int ENTER_ACTIVITY_CONVERSION

A user enters the specified activity.

ENTER_ACTIVITY_CONVERSION: 0

For details about other constant values, please refer to Constant Values.

EXIT_ACTIVITY_CONVERSION

Expand

Fields

public static final int EXIT_ACTIVITY_CONVERSION

A user exits the specified activity.

EXIT_ACTIVITY_CONVERSION: 1

For details about other constant values, please refer to Constant Values.

Public Constructors

ActivityConversionInfo

Expand

Constructor

public ActivityConversionInfo()

Builds an ActivityConversionInfo instance.

ActivityConversionInfo(int activityType, int conversionType)

Expand

Constructor

public ActivityConversionInfo(int activityType, int conversionType)

Builds an ActivityConversionInfo instance.

Parameters

Expand

Name

Description

activityType

Activity type. The activity type cannot be OTHERS. For details, please refer to Constant Values.

conversionType

Conversion type. For details, please refer to Constant Values.

Throws

Expand

Name

Description

IllegalArgumentException

Invalid parameter. Ensure that the values of activityType and conversionType are valid.

Public Methods

getActivityType

Expand

Method

public int getActivityType()

Obtains the activity type of the current activity conversion instance.

Returns

Expand

Type

Description

int

Activity type. The activity type cannot be OTHERS. For details, please refer to Constant Values.

getConversionType

Expand

Method

public int getConversionType()

Obtains the conversion type of the current activity conversion instance.

Returns

Expand

Type

Description

int

Conversion type. The options are ENTER_ACTIVITY_CONVERSION and EXIT_ACTIVITY_CONVERSION.

setActivityType

Expand

Method

public void setActivityType(int activityType)

Sets the activity type of the current activity conversion instance. The value of activityType must be one of the activity types defined by ActivityIdentificationData. Activity type OTHERS is not supported. Otherwise, an error indicating invalid parameter will be thrown.

Parameters

Expand

Name

Description

activityType

Activity type. The activity type cannot be OTHERS. For details, please refer to Constant Values.

Throws

Expand

Name

Description

IllegalArgumentException

Invalid parameter. Ensure that the value of activityType is valid.

setConversionType

Expand

Method

public void setConversionType(int conversionType)

Sets the conversion type of the current activity conversion instance. The value of conversionType must be one of the conversion types defined by ActivityConversionInfo. Otherwise, an error indicating invalid parameter will be thrown.

Parameters

Expand

Name

Description

conversionType

Conversion type. The options are ENTER_ACTIVITY_CONVERSION and EXIT_ACTIVITY_CONVERSION.

Throws

Expand

Name

Description

IllegalArgumentException

Invalid parameter. Ensure that the value of conversionType is valid.

Search
Enter a keyword.