hyphenate_SDK3.0  3.8.6.1
hyphenate java IM SDK
Classes | Public Member Functions | List of all members
com.hyphenate.chat.EMPushManager Class Reference

Classes

enum  DisplayStyle
 

Public Member Functions

void enableOfflinePush () throws HyphenateException
 
void disableOfflinePush (int start, int end) throws HyphenateException
 
EMPushConfigs getPushConfigs ()
 
EMPushConfigs getPushConfigsFromServer () throws HyphenateException
 
void updatePushServiceForGroup (List< String > groupIds, boolean noPush) throws HyphenateException
 
void updatePushServiceForUsers (List< String > userIds, boolean noPush) throws HyphenateException
 
List< String > getNoPushGroups ()
 
List< String > getNoPushUsers ()
 
boolean updatePushNickname (String nickname) throws IllegalArgumentException, HyphenateException
 
void asyncUpdatePushNickname (String nickname, EMCallBack callback)
 
void updatePushDisplayStyle (DisplayStyle style) throws IllegalArgumentException, HyphenateException
 
void asyncUpdatePushDisplayStyle (DisplayStyle style, EMCallBack callback)
 

Detailed Description

Offline push message manager class that used for GCM and APNS

Member Function Documentation

◆ asyncUpdatePushDisplayStyle()

void com.hyphenate.chat.EMPushManager.asyncUpdatePushDisplayStyle ( DisplayStyle  style,
EMCallBack  callback 
)

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

Asynchronously method

Parameters
stylePush message style

◆ asyncUpdatePushNickname()

void com.hyphenate.chat.EMPushManager.asyncUpdatePushNickname ( String  nickname,
EMCallBack  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 EMUserInfoManager#updateOwnInfoByAttribute(EMUserInfo.EMUserInfoType, String, EMValueCallBack) 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

◆ disableOfflinePush()

void com.hyphenate.chat.EMPushManager.disableOfflinePush ( int  start,
int  end 
) throws HyphenateException

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
HyphenateException

◆ enableOfflinePush()

void com.hyphenate.chat.EMPushManager.enableOfflinePush ( ) throws HyphenateException

Enable offline message push

Synchronization method will block the current thread

Exceptions
HyphenateException

◆ getNoPushGroups()

List<String> com.hyphenate.chat.EMPushManager.getNoPushGroups ( )

Get the group list that disabled offline push

Synchronization method will block the current thread

Returns

◆ getNoPushUsers()

List<String> com.hyphenate.chat.EMPushManager.getNoPushUsers ( )

get the users list that disabled offline push from the cache,If the user needs to get the latest data, he can call {@Link EmpushManager# getPushConfigsFromServer()} before calling this method

Returns

◆ getPushConfigs()

EMPushConfigs com.hyphenate.chat.EMPushManager.getPushConfigs ( )

Get push configs from cache

Returns

◆ getPushConfigsFromServer()

EMPushConfigs com.hyphenate.chat.EMPushManager.getPushConfigsFromServer ( ) throws HyphenateException

Get push configs from server

Synchronization method will block the current thread

Returns
Exceptions
HyphenateException

◆ updatePushDisplayStyle()

void com.hyphenate.chat.EMPushManager.updatePushDisplayStyle ( DisplayStyle  style) throws IllegalArgumentException, HyphenateException

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

Synchronization method will block the current thread

Parameters
stylePush message style

◆ updatePushNickname()

boolean com.hyphenate.chat.EMPushManager.updatePushNickname ( String  nickname) throws IllegalArgumentException, HyphenateException

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 EMUserInfoManager#updateOwnInfoByAttribute(EMUserInfo.EMUserInfoType, String, EMValueCallBack) to set}, be sure to also call this method to update to prevent the display of differences

Asynchronously method see asyncUpdatePushNickname(String, EMCallBack)

Synchronization method will block the current thread

Parameters
nicknamePush nickname, which are different from nickname in user properties

◆ updatePushServiceForGroup()

void com.hyphenate.chat.EMPushManager.updatePushServiceForGroup ( List< String >  groupIds,
boolean  noPush 
) throws HyphenateException

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
HyphenateException

◆ updatePushServiceForUsers()

void com.hyphenate.chat.EMPushManager.updatePushServiceForUsers ( List< String >  userIds,
boolean  noPush 
) throws HyphenateException

Sets whether the specified group accepts offline message push

Parameters
userIdsthe list of users to be set
noPushtrue:not accept offline push, false:accept offline push
Exceptions
HyphenateException

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