agora_chat_SDK  3.8.2
agorajavachatSDK
Classes | Public Member Functions | List of all members
io.agora.chat.PushManager Class Reference

Classes

enum  DisplayStyle
 

Public Member Functions

void enableOfflinePush () throws ChatException
 
void disableOfflinePush (int start, int end) throws ChatException
 
PushConfigs getPushConfigs ()
 
PushConfigs getPushConfigsFromServer () throws ChatException
 
void updatePushServiceForGroup (List< String > groupIds, boolean noPush) throws ChatException
 
List< String > getNoPushGroups ()
 
boolean updatePushNickname (String nickname) throws IllegalArgumentException, ChatException
 
void asyncUpdatePushNickname (String nickname, CallBack callback)
 
void updatePushDisplayStyle (DisplayStyle style) throws IllegalArgumentException, ChatException
 
void asyncUpdatePushDisplayStyle (DisplayStyle style, CallBack callback)
 

Detailed Description

Offline push message manager class that used for GCM and APNS

Member Function Documentation

void io.agora.chat.PushManager.asyncUpdatePushDisplayStyle ( DisplayStyle  style,
CallBack  callback 
)

Update push message style, default is DisplayStyle#SimpleBanner Synchronization method see updatePushDisplayStyle(DisplayStyle)

Asynchronously method

Parameters
stylePush message style
void io.agora.chat.PushManager.asyncUpdatePushNickname ( String  nickname,
CallBack  callback 
)

Update the push nickname of current user This method can be used to set a push nickname, the push nickname will be used to show for offline push When the user changes the nickname(use or UserInfoManager#updateOwnInfoByAttribute(UserInfo.UserInfoType, String, ValueCallBack) to set}, be sure to also call this method to update to prevent the display of differences

Synchronization method see updatePushNickname(String)

Asynchronously method

Parameters
nicknamePush nickname, which are different from nickname in user properties
void io.agora.chat.PushManager.disableOfflinePush ( int  start,
int  end 
) throws ChatException

The offline message is not pushed within the specified time period (24-hour clock)

Synchronization method will block the current thread

Parameters
startstart hour
endend hour
Exceptions
ChatException
void io.agora.chat.PushManager.enableOfflinePush ( ) throws ChatException

Enable offline message push

Synchronization method will block the current thread

Exceptions
ChatException
List<String> io.agora.chat.PushManager.getNoPushGroups ( )

Get the group list that disabled offline push

Synchronization method will block the current thread

Returns
PushConfigs io.agora.chat.PushManager.getPushConfigs ( )

Get push configs from cache

Returns
PushConfigs io.agora.chat.PushManager.getPushConfigsFromServer ( ) throws ChatException

Get push configs from server

Synchronization method will block the current thread

Returns
Exceptions
ChatException
void io.agora.chat.PushManager.updatePushDisplayStyle ( DisplayStyle  style) throws IllegalArgumentException, ChatException

Update push message style, default is DisplayStyle#SimpleBanner Asynchronously method see asyncUpdatePushDisplayStyle(DisplayStyle, CallBack)

Synchronization method will block the current thread

Parameters
stylePush message style
boolean io.agora.chat.PushManager.updatePushNickname ( String  nickname) throws IllegalArgumentException, ChatException

Update the push nickname of current user This method can be used to set a push nickname, the push nickname will be used to show for offline push When the user changes the nickname(use or UserInfoManager#updateOwnInfoByAttribute(UserInfo.UserInfoType, String, ValueCallBack) to set}, be sure to also call this method to update to prevent the display of differences

Asynchronously method see asyncUpdatePushNickname(String, CallBack)

Synchronization method will block the current thread

Parameters
nicknamePush nickname, which are different from nickname in user properties
void io.agora.chat.PushManager.updatePushServiceForGroup ( List< String >  groupIds,
boolean  noPush 
) throws ChatException

Sets whether the specified group accepts offline message push

Synchronization method will block the current thread

Parameters
groupIdsThe list of groups to be set
noPushTrue:not accept offline push, false:accept offline push
Exceptions
ChatException

The documentation for this class was generated from the following file: