Getting Started

Updated at:

Unified Storage supports two connection types: native Android Archive (AAR) connection and component-based connection. It provides database, key-value, and file storage to meet various business needs.

Prerequisites

Add the SDK

Native AAR connection

Use Component Management (AAR) to install the Storage component in your project. For more information, see AAR Component Management.

Component-based approach

In Portal and Bundle projects, use Component Management to install the Storage component. For more information, see Manage component dependencies.

Initialize mPaaS

If you added the SDK using the native AAR connection, initialize mPaaS by adding the following code to your Application class:

public class MyApplication extends Application {
    
    @Override
    public void onCreate() {
        super.onCreate();
        // Initialize mPaaS
        MP.init(this);    
    }
}

For more information, see mPaaS Initialization.

Use storage

Code sample

Click here to obtain the sample code.