Mobile Push SDK compliance guide (Android)

更新时间:
复制 MD 格式

Note

To comply with regulations such as the Personal Information Protection Law, the Data Security Law, and the Cybersecurity Law, you, as an app developer, must respect and protect the personal information of your end users. Do not illegally collect or use personal information. This guide helps you use the Mobile Push software development kit (SDK) in a compliant manner and protect the privacy of your end users.

System permissions requested by the Mobile Push SDK

Permission

Required

Purpose

INTERNET

Yes

Allows the SDK to connect to the internet to provide the push service.

ACCESS_NETWORK_STATE

Yes

Detects the network status to maintain a persistent push connection.

VIBRATE

Yes

Enables vibration for push notifications.

POST_NOTIFICATIONS

Yes

Allows the app to display push notifications on Android 13 and later.

Mobile Push SDK features and related personal information

Feature

Personal information field collected

Purpose of collection

Configuration and example

Push feature

(Basic feature)

Device ID information (phone brand, model, and system version)

To improve push accuracy and reliability.

Basic feature. This information is required.

Configuration for optional personal information fields

Optional personal information field

Purpose of collection

Configuration and example

Phone number

To use the text message interaction feature of Mobile Push, you need to obtain and attach the user's mobile phone number.

Configure this feature by calling void bindPhoneNumber(String phoneNumber,CommonCallback callback). By default, phone numbers are not attached.

Compliant initialization for the Mobile Push SDK

// SDK configuration method
public static void init(PushInitConfig pushInitConfig);

// Register the push service
// Call CloudPushService.register(...) only after the user agrees to the Privacy Policy.
public void register(Context context, CommonCallback callback);
Important
  • You can call the PushServiceFactory.init(...) method before the user agrees to the Privacy Policy.

  • Call the CloudPushService.register(...) method only after the user agrees to the Privacy Policy.

Code examples

val pushInitConfig = PushInitConfig.Builder()
    .application(application)
    .appKey(appKey)    // Enter your appKey
    .appSecret(appSecret)    // Enter your appSecret
    .build()
    
PushServiceFactory.init(pushInitConfig)

// Call CloudPushService.register(...) only after the user reads your Privacy Policy and grants authorization.
val pushService = PushServiceFactory.getCloudPushService()
pushService.register(this, object : com.alibaba.sdk.android.push.CommonCallback {
    override fun onSuccess(success: String) {}
    override fun onFailed(errorCode: String, errorMessage: String) {}
})
PushInitConfig pushInitConfig = new PushInitConfig.Builder()
        .application(application)
        .appKey(appKey)    // Enter your appKey
        .appSecret(appSecret)    // Enter your appSecret
        .build();
        
PushServiceFactory.init(pushInitConfig);

// Call CloudPushService.register(...) only after the user reads your Privacy Policy and grants authorization.
CloudPushService pushService = PushServiceFactory.getCloudPushService();
pushService.register(this, new com.alibaba.sdk.android.push.CommonCallback() {
    @Override
    public void onSuccess(String success) {

    }

    @Override
    public void onFailed(String errorCode, String errorMessage) {
        
    }
});