Crash Analytics SDK compliance guide (Android)
Laws and regulations, such as the Personal Information Protection Law, the Data Security Law, and the Cybersecurity Law, require app developers and operators (developers) to protect the personal information of end users. You must not illegally collect or use personal information when you provide network products and services. This guide helps you use the Crash Analytics SDK in compliance with these requirements and protect the rights of your end users.
1. System permissions requested by the Crash Analytics SDK
Permission details | Required | Purpose |
INTERNET | Yes | The basic permission that lets the SDK connect to the internet. It is used to report app crash and issue logs. |
ACCESS_NETWORK_STATE | Yes | Collects network information. |
2. Crash Analytics SDK features and related personal information
Feature | Personal information field collected | Purpose of collecting personal information | Configuration and example |
Basic features | Device information (CPU, model), system information (OS version) | Generates crash and issue logs to provide useful information for troubleshooting. | Not applicable |
3. Configuration for optional personal information fields in the Crash Analytics SDK
Optional personal information field | Purpose of collecting personal information | Configuration and example |
Device information (brand, resolution) | To analyze which devices experience crashes or issues. | AliHaConfig config = new AliHaConfig(); config.noCollectionDataType = AliHaConfig.NO_DEVICE_DATA; |
System information (language) | To analyze which systems experience crashes or issues. | AliHaConfig config = new AliHaConfig(); config.noCollectionDataType = NO_OS_DATA; |
Network information (carrier, network type) | To analyze which network conditions cause crashes or issues. | AliHaConfig config = new AliHaConfig(); config.noCollectionDataType = AliHaConfig.NO_NETWORK_DATA; |
4. Compliant initialization configuration for the Crash Analytics 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);Call the AliHaConfig.getInstance().preStart(...) method before the end user agrees to the privacy policy. This method registers the lifecycle and must be called in Application.onCreate().
Call the AliHaAdapter.getInstance().start(...) method only after the end user agrees to the privacy policy.
Code example
// Call this in Application.onCreate().
AliHaConfig.getInstance().preStart(application)
// Make sure to call AliHaAdapter.getInstance().start(...) only after the user reads your privacy policy and grants authorization.
AliHaConfig config = new AliHaConfig();
// You can disable the collection of device, system, and network information as needed. If you disable collection, you cannot view information about performance issues.
config.noCollectionDataType = AliHaConfig.NO_DEVICE_DATA | AliHaConfig.NO_OS_DATA | AliHaConfig.NO_NETWORK_DATA;
AliHaConfig.getInstance().addPlugin(Plugin.crashreporter);
AliHaConfig.getInstance().start(config);