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

Configure offline push

Attention
:
  • 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 is switched to the background. It can be used to get the initial unread message count for the app badge.

  • Starting from version 5.0.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()

abstract void doForeground ( V2TIMCallback  callback)
abstract

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

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