目录

ReportPolicy

Enum Info

public enum ReportPolicy

Sets automatic event reporting policies.

Public Field Summary

Qualifier and Type

Field and Description

public enum

ON_APP_LAUNCH_POLICY

Policy for reporting an event when an app is launched. You do not need to set parameters.

public enum

ON_MOVE_BACKGROUND_POLICY

Policy for reporting an event when an app is switched to the background (including app exit). You do not need to set parameters.

public enum

ON_SCHEDULED_TIME_POLICY

Policy for reporting an event at the specified interval. The value ranges from 60 to 1800, in seconds. The default value is 60.

public enum

ON_CACHE_THRESHOLD_POLICY

Policy for reporting an event when the data cache reaches the specified threshold. The value ranges from 30 to 1000. The default value is 30.

Public Method Summary

Qualifier and Type

Method Name and Description

final void

setThreshold(long threshold)

Sets the threshold for event reporting.

final long

getThreshold()

Obtains the threshold for event reporting.

Public Methods

setThreshold

Method

public final void setThreshold(long threshold)

Sets the threshold for event reporting.

Parameters

Name

Description

threshold

Threshold for event reporting.

[h2]getThreshold

Method

public final long getThreshold()

Obtains the threshold for event reporting.

Returns

Type

Description

long

Threshold for event reporting. Only the effective threshold will be returned. If no threshold has been set, the default value is used.

You do not need to set a threshold for ON_MOVE_BACKGROUND_POLICY and ON_APP_LAUNCH_POLICY. The return value is -1 for the two policies.