doForeground

Introduction

Invoking this method when the APP changes to the foreground state.

You can listen to Android activity lifeCycle events according to this document.

The offline notification push of new messages will not be triggered, in this moment.

This method is supposed to be called manually on Android devices only, while the SDK can take in charger of it on iOS.

Parameter details

This API has no parameters

Returned template

V2TimCallback

{
    code : int
    desc : String
}

Return value details

name type description
code int Request result: Error codes. 0 means success.
desc String The description of the error. It will be empty if success.V2TimMsgCreateInfoResult

Code example

    V2TimCallback doForegroundRes = await TencentImSDKPlugin.v2TIMManager
        .getOfflinePushManager()
        .doForeground();
    if (doForegroundRes.code == 0) {
    }

results matching ""

    No results matching ""