doForeground method Null safety
This API can be called when the app detects that the app switches to the foreground.
Starting from version 5.0.1 (native), corresponding to doBackground, offline push by manufacturers will be stopped. But if the app is killed, offline pushes can still be received normally.
Parameter
callback Callback
Implementation
Future<V2TimCallback> doForeground() async {
return V2TimCallback.fromJson(
formatJson(
await _channel.invokeMethod(
"doForeground",
buildParam(
{},
),
),
),
);
}