Mobile Hotfix SDK compliance guide (Android)

Updated at:

Note

In compliance with laws and regulations such as the Personal Information Protection Law, the Data Security Law, and the Network Security Law, app developers and operators (developers) must respect and protect the personal information of end users when providing network products and services. Developers must not illegally collect or use personal information. This compliance guide is designed to help developers meet personal information protection requirements when using the Mobile Hotfix SDK and to prevent the violation of end users' rights and interests.

1. System permissions requested by the Mobile Hotfix SDK

Permission

Required

Purpose

INTERNET

Yes

The basic permission that lets the SDK connect to the internet to pull the latest patches from the cloud.

READ_EXTERNAL_STORAGE

Yes

Reads patches from the SD card to test local patches.

2. Mobile Hotfix SDK features and related personal information

Feature

Personal information field collected

Purpose of collection

Configuration plan and example

Patching feature

(Basic feature)

Device ID information (phone brand, model, device manufacturer, OS version)

Lets you publish patches based on device information and gather statistics on devices where patch fixes failed.

Basic feature. Required information.

3. Configuration plan for optional personal information fields

Optional personal information field

Purpose of collection

Configuration plan and example

Not applicable

Not applicable

Not applicable

4. Compliant initialization configuration for the Mobile Hotfix SDK

// SDK configuration method
public void initialize();

// Query and load a new patch
// Ensure the user agrees to the Privacy Policy before calling SophixManager.queryAndLoadNewPatch().
public void queryAndLoadNewPatch();
Important
  • The SophixManager.getInstance().initialize() method can be called before the user agrees to the Privacy Policy.

  • Ensure the user agrees to the Privacy Policy before calling the SophixManager.getInstance().queryAndLoadNewPatch() method.

Code example

SophixManager.getInstance()
    .setContext(context)
    .setAppVersion(appVersion)
    .setSecretMetaData(idSecret, appSecret, rsaSecret)
    .setPatchLoadStatusStub(new PatchLoadStatusListener() {
        @Override
        public void onLoad(final int mode, final int code, final String info, final int handlePatchVersion) {
            if (code == PatchStatus.CODE_LOAD_SUCCESS) {
                Log.i(TAG, "sophix load patch success!");
            } else if (code == PatchStatus.CODE_LOAD_RELAUNCH) {
                // If a background restart is needed, save the state using SharePreference here.
                Log.i(TAG, "sophix preload patch success. restart app to make effect.");
            }
        }
      }).initialize();
      
// Ensure the user reads your Privacy Policy and grants authorization before calling the patch query method below.
SophixManager.getInstance().queryAndLoadNewPatch();