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

virtual ~V2TIMOfflinePushManager ()
 
virtual void SetOfflinePushConfig (const V2TIMOfflinePushConfig &config, V2TIMCallback *callback)=0
 
virtual void DoBackground (uint32_t unreadCount, V2TIMCallback *callback)=0
 
virtual void DoForeground (V2TIMCallback *callback)=0
 

Constructor & Destructor Documentation

◆ ~V2TIMOfflinePushManager()

virtual ~V2TIMOfflinePushManager ( )
inlinevirtual

Member Function Documentation

◆ SetOfflinePushConfig()

virtual void SetOfflinePushConfig ( const V2TIMOfflinePushConfig config,
V2TIMCallback callback 
)
pure virtual

Configure offline push Note:

  • To disable offline push, set config to SetOfflinePushConfig().
    Parameters
    configOffline push configuration
    callbackCallback

◆ DoBackground()

virtual void DoBackground ( uint32_t  unreadCount,
V2TIMCallback callback 
)
pure virtual

This API can be called when the app is switched to the background. It can be used to get the initial unread message count for the app badge.

  • Starting from version 6.1, if offline push is enabled, users will receive notification bar messages delivered via the system's offline push channel.
Parameters
unreadCountUnread count
callbackCallback

◆ DoForeground()

virtual void DoForeground ( V2TIMCallback callback)
pure virtual

This API can be called when the app is switched to the foreground.

  • Starting from version 6.1, this API will stop offline push. However, if the app is killed, users can still receive offline push notifications.
Parameters
callbackCallback