setHeartbeatInterval method
The number of seconds(heartbeatIntervalInSeconds
) between which a heartbeat request is sent to the MobileFirst server to keep the connection alive.
The default interval is 7 minutes or 420 seconds. Heartbeats are sent only when the app is in the foreground.
This is a non blocking call and can be await
ed
Implementation
Future<void> setHeartbeatInterval({@required int heartbeatIntervalInSeconds}) async {
_channel.invokeMethod(WLCLIENT_SETHEARTBEAT_INTERVAL,
<String, dynamic>{HEARTBEAT_INTERVAL: heartbeatIntervalInSeconds});
}