Package io.rong.common
Class WakeLockUtils
-
- All Implemented Interfaces:
public class WakeLockUtils
-
-
Constructor Summary
Constructors Constructor Description WakeLockUtils()
-
Method Summary
Modifier and Type Method Description static void
scheduleHeartbeat(Context context)
Enables heartbeat (sends a fixed message to the server at regular intervals. static void
cancelHeartbeat(Context context)
Cancels the heartbeat, for internal SDK use. static void
disableSDKHeartBeat(Context context)
Disables the SDK's default background heartbeat mechanism with a 2.5-minute interval. -
-
Method Detail
-
scheduleHeartbeat
static void scheduleHeartbeat(Context context)
Enables heartbeat (sends a fixed message to the server at regular intervals. If the server does not receive any message from the client within a few minutes, the client is considered disconnected.)
- Parameters:
context
- The context
-
cancelHeartbeat
static void cancelHeartbeat(Context context)
Cancels the heartbeat, for internal SDK use. Current usage scenarios: - Callback execution when connect fails - Execution during logout (disconnect)
- Parameters:
context
- The context
-
disableSDKHeartBeat
static void disableSDKHeartBeat(Context context)
Disables the SDK's default background heartbeat mechanism with a 2.5-minute interval.
- Parameters:
context
- The context
-
-
-
-