Help Center > > API Reference> AgentLite API Reference (Java)> APIs> Access of Directly Connected Devices> Initializing AgentLite Resources

Initializing AgentLite Resources

Updated at: Aug 28, 2019 GMT+08:00

API Function

This API is used to initialize AgentLite resources.

API Description

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

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.)

Return Value

Return Value

Description

true

Success

false

Failure

Example

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

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel