init

public static void init(Application application, String appKey)

Initializes the RCSDK. This should be called only once globally throughout the application.

This method must be called in the main process. It is recommended to call it in the Application inherited class.

Deprecated

This method is deprecated. Please use init instead.

Parameters

application

The Application class object.

appKey

The App Key obtained after creating an application on the RCDeveloper Platform.


public static void init(Context context)

Initializes the SDK. This should be called only once globally in the application, preferably in the Application inherited class.

Deprecated

This method is deprecated. Please use init instead.

Parameters

context

The Context of the Application class.


public static void init(Context context, String appKey)

Initializes the SDK. This should be called only once globally in the application. It is recommended to call this in the Application subclass.

Deprecated

This method is deprecated. Please use init instead.

Parameters

context

The Context of the Application class.

appKey

The App Key obtained after creating an application on the RCDeveloper Platform.

This parameter is optional. If not provided, the SDK will use the RONG_CLOUD_APP_KEY configured in AndroidManifest.xml.<meta-data android:name=RONG_CLOUD_APP_KEY android:value=****** />


public static void init(Context context, String appKey, boolean enablePush)

Initializes the SDK. This should be called only once globally in the application. It is recommended to call this in the Application subclass.

Deprecated

This method is deprecated. Please use init instead.

Parameters

context

The Context of the Application class.

appKey

The App Key obtained after creating an application on the RCdeveloper platform.

This parameter is optional. If no value is provided, the SDK will use the RONG_CLOUD_APP_KEY configured in the AndroidManifest.xml.<meta-data android:name=RONG_CLOUD_APP_KEY android:value=****** />

enablePush

Whether to enable push notification. true to enable push; false to disable push.


public static void init(Context context, String appKey, boolean enablePush, Boolean isMainProcess)

Initializes the SDK. This should be called only once globally throughout the application. It is recommended to call this in the Application subclass.

Deprecated

This method is deprecated. Please use init instead.

Parameters

context

The Context of the Application class.

appKey

The App Key obtained after creating an application on the RCdeveloper platform.

This parameter is optional. If no value is passed, the SDK will use the RONG_CLOUD_APP_KEY configured in AndroidManifest.xml.<meta-data android:name=RONG_CLOUD_APP_KEY android:value=****** />

enablePush

Whether to enable push notifications. true enables push; false disables push.

isMainProcess

Whether it is the main process. If null, the SDK will determine the process.