IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMOfflinePushManagerabstract

Public Member Functions

abstract void setOfflinePushConfig (V2TIMOfflinePushConfig config, V2TIMCallback callback)
 
abstract void doBackground (int unreadCount, V2TIMCallback callback)
 
abstract void doForeground (V2TIMCallback callback)
 

Member Function Documentation

◆ setOfflinePushConfig()

abstract void setOfflinePushConfig ( V2TIMOfflinePushConfig  config,
V2TIMCallback  callback 
)
abstract

Set offline push configuration Note:

  • To disable offline push, set config to null.
    Parameters
    configOffline push configuration
    callbackCallback

◆ doBackground()

abstract void doBackground ( int  unreadCount,
V2TIMCallback  callback 
)
abstract

This API can be called when the app detects that the app switches to the background. It can be used to specify the initial unread count of the desktop badge.

  • Starting from version 5.0.1, if offline push is configured, users can receive notification bar messages delivered by vendors via the offline push channel.
Parameters
unreadCountUnread count
callbackCallback

◆ doForeground()

abstract void doForeground ( V2TIMCallback  callback)
abstract

This API can be called when the app detects that the app switches to the foreground.

  • Starting from version 5.0.1, in contrast to doBackground, this API stops vendor offline pushes. However, if the app is killed, users can still receive offline pushes properly.
Parameters
callbackCallback