Updated on 2022-02-24 GMT+08:00

Initializing AgentLite Resources

API Function

This API is used to initialize AgentLite resources.

API Description

1
public static boolean init(String workPath, String logPath, Context context);

Class

BaseService

Parameter Description

Parameter

Mandatory or Optional

Type

Description

workPath

Mandatory

String

Specifies the AgentLite working path, which is used to store the AgentLite configuration files and temporary files. The working path must be valid.

logPath

Optional

String

Specifies the log path. (If this parameter is left unspecified, logs are written to the working path.)

context

Mandatory

Context

Specifies the Android application context.

Return Value

Return Value

Description

true

Success

false

Failure

Example

1
2
//Call this API to initialize AgentLite resources.
BaseService.init("/sdcard/helloWorld", null, context);