Compliance guide for Remote Log SDK (Android)

更新时间:
复制 MD 格式

Note

App developers and operators (developers) must respect and protect the personal information of end users when providing online products and services. This is required by laws and regulations such as the Personal Information Protection Law, the Data Security Law, and the Network Security Law. The illegal collection or use of personal information is prohibited. This compliance guide helps you comply with these requirements when using the Remote Log software development kit (SDK) and avoid infringing on the rights of end users.

I. System permissions requested by the Remote Log SDK

Permission

Required

Purpose

INTERNET

Yes

Allows the SDK to connect to the internet to report app performance logs.

ACCESS_NETWORK_STATE

Yes

Collects network information.

WRITE_EXTERNAL_STORAGE

No

Stores remote log files on the SD card.

READ_EXTERNAL_STORAGE

No

Reads remote log files from the SD card.

II. Remote Log SDK features and related personal information

Feature

Personal information field collected

Purpose of collection

Configuration and example

Not applicable

Not applicable

Not applicable

Not applicable

III. Configuration for optional personal information fields

Optional personal information field

Purpose of collection

Configuration and example

Device information (brand, model, resolution)

Used to pull logs from a specific device.

AliHaConfig config = new AliHaConfig();

config.noCollectionDataType = AliHaConfig.NO_DEVICE_DATA;

System information (OS version, language)

Used to pull logs from a specific system.

AliHaConfig config = new AliHaConfig();

config.noCollectionDataType = NO_OS_DATA;

Network information (carrier, network type)

Helps analyze remote logs.

AliHaConfig config = new AliHaConfig();

config.noCollectionDataType = AliHaConfig.NO_NETWORK_DATA;

IV. Compliant initialization for the Remote Log SDK

// SDK configuration method
public void preStart(Application application);

// Make sure to call AliHaAdapter.getInstance().start(...) only after the user agrees to the Privacy Policy.
public Boolean start(AliHaConfig config);
Important
  • The AliHaConfig.getInstance().preStart(...) method can be called before the user agrees to the Privacy Policy. Call this method in Application.onCreate() to register the lifecycle.

  • Make sure to call the AliHaAdapter.getInstance().start(...) method only after the user agrees to the Privacy Policy.

Code example

// Call in Application.onCreate()
AliHaConfig.getInstance().preStart(application)

// Make sure to call the AliHaAdapter.getInstance().start(...) method only after the user reads your Privacy Policy and grants authorization.
AliHaConfig config = new AliHaConfig();
// Disable the collection of device, system, and network information as needed. If collection is disabled, information about performance issues will not be available.
config.noCollectionDataType = AliHaConfig.NO_DEVICE_DATA | AliHaConfig.NO_OS_DATA | AliHaConfig.NO_NETWORK_DATA;
AliHaConfig.getInstance().addPlugin(Plugin.tlog);  
AliHaConfig.getInstance().start(config);