im::floo::floolib::BMXPushManager
Push manager
Public Functions
Name | |
---|---|
BMXPushManager(BMXPushService service) | |
void | start(final String alias, final String bmxToken, final BMXCallBack callBack) Initialize push sdk. Use this interface to initialize the push sdk in the case of using push only. When using IM features at the same time, call login function directly in BMXClient. The config object initializes by passing in the platform type and device id. |
void | start(final String alias, final BMXCallBack callBack) |
void | start(final BMXCallBack callBack) |
void | stop(final BMXCallBack callBack) Shut push feature interface. |
void | resume(final BMXCallBack callBack) Resume push function. |
void | unbindAlias(final String alias, final BMXCallBack callBack) Unbind user alias. |
String | getToken() Get user token to use after login. |
String | getCert() Get push certificate returned by server after login. |
BMXPushService.PushSdkStatus | status() Push the current state of sdk. |
void | bindDeviceToken(final String token, final BMXCallBack callBack) Push binding device token. |
void | bindVoipToken(final String token, final BMXCallBack callBack) Bind voiptoken of push device |
void | getPushProfile(final boolean forceRefresh, final BMXDataCallBack< BMXPushUserProfile > callBack) Get push user details, force pull from server-side if forceRefresh == true |
void | setTags(final TagList tags, final String operationId, final BMXCallBack callBack) Set tags of push user. |
void | getTags(final TagList tags, final String operationId, final BMXCallBack callBack) Get tags of the push user. |
void | deleteTags(final TagList tags, final String operationId, final BMXCallBack callBack) Delete tags of the push user. |
void | clearTags(final String operationId, final BMXCallBack callBack) Clear tags of the push user. |
void | setBadge(final int count, final BMXCallBack callBack) Set unread badge for push user. |
void | setPushMode(final boolean enable, final BMXCallBack callBack) Set push enabled state. Default enabled. |
void | setPushMode(final BMXCallBack callBack) |
void | setPushTime(final int startHour, final int endHour, final BMXCallBack callBack) Set allowed push time. |
void | setSilenceTime(final int startHour, final int endHour, final BMXCallBack callBack) Set the start and end time of silent push. |
void | setRunBackgroundMode(final boolean enable, final BMXCallBack callBack) Set whether to run push in background, default false. |
void | setRunBackgroundMode(final BMXCallBack callBack) |
void | setGeoFenceMode(final boolean enable, final boolean isAllow, final BMXCallBack callBack) Set whether to run push geo-fencing feature. |
void | setGeoFenceMode(final boolean enable, final BMXCallBack callBack) |
void | setGeoFenceMode(final BMXCallBack callBack) |
void | clearNotification(final long notificationId) Clear notifications for the specified id. |
void | clearAllNotifications() |
void | sendMessage(final String content) Send a push uplink message and notify the listener of a change in message status |
void | loadLocalPushMessages(final long refMsgId, final long size, final BMXMessageList result, final BMXPushService.PushDirection arg3, final BMXCallBack callBack) Load push message stored in local database. Start with latest message if not specified |
void | loadLocalPushMessages(final long refMsgId, final long size, final BMXMessageList result, final BMXCallBack callBack) |
void | addPushListener(BMXPushServiceListener listener) Add push listener |
void | removePushListener(BMXPushServiceListener listener) Remove push listener |
Public Functions Documentation
function BMXPushManager
inline BMXPushManager(
BMXPushService service
)
Example:
function start
inline void start(
final String alias,
final String bmxToken,
final BMXCallBack callBack
)
Initialize push sdk. Use this interface to initialize the push sdk in the case of using push only. When using IM features at the same time, call login function directly in BMXClient. The config object initializes by passing in the platform type and device id.
Parameters:
- alias Current user alias used for push initialization
- bmxToken User token to use that passed in by App when push initialization, and no passing in is OK without users.
- callBack [BMXErrorCode]
Example:
public void start(String alias, String bmxToken, BMXCallBack callBack) {
mService.start(alias, bmxToken, callBack);
public void start(String alias, BMXCallBack callBack) {
mService.start(alias, callBack);
public void start(BMXCallBack callBack) {
mService.start(callBack);
function start
inline void start(
final String alias,
final BMXCallBack callBack
)
Example:
public void start(String alias, String bmxToken, BMXCallBack callBack) {
mService.start(alias, bmxToken, callBack);
public void start(String alias, BMXCallBack callBack) {
mService.start(alias, callBack);
public void start(BMXCallBack callBack) {
mService.start(callBack);
function start
inline void start(
final BMXCallBack callBack
)
Example:
public void start(String alias, String bmxToken, BMXCallBack callBack) {
mService.start(alias, bmxToken, callBack);
public void start(String alias, BMXCallBack callBack) {
mService.start(alias, callBack);
public void start(BMXCallBack callBack) {
mService.start(callBack);
function stop
inline void stop(
final BMXCallBack callBack
)
Shut push feature interface.
Parameters:
- callBack [BMXErrorCode]
Example:
public void stop(BMXCallBack callBack) {
mService.stop(callBack);
function resume
inline void resume(
final BMXCallBack callBack
)
Resume push function.
Parameters:
- callBack [BMXErrorCode]
Example:
public void resume(BMXCallBack callBack) {
mService.resume(callBack);
function unbindAlias
inline void unbindAlias(
final String alias,
final BMXCallBack callBack
)
Unbind user alias.
Parameters:
- alias The user alias that needs to be unbound.
- callBack [BMXErrorCode]
Example:
public void unbindAlias(String alias, BMXCallBack callBack) {
mService.unbindAlias(alias, callBack);
function getToken
inline String getToken()
Get user token to use after login.
Example:
public String getToken() {
return mService.getToken();
function getCert
inline String getCert()
Get push certificate returned by server after login.
Example:
public String getCert() {
return mService.getCert();
function status
inline BMXPushService.PushSdkStatus status()
Push the current state of sdk.
Return: PushSdkStatus
Example:
public BMXPushService.PushSdkStatus status() {
return mService.status();
function bindDeviceToken
inline void bindDeviceToken(
final String token,
final BMXCallBack callBack
)
Push binding device token.
Parameters:
- token Device push token
- callBack [BMXErrorCode]
Example:
public void bindDeviceToken(String token, BMXCallBack callBack) {
mService.bindDeviceToken(token, callBack);
function bindVoipToken
inline void bindVoipToken(
final String token,
final BMXCallBack callBack
)
Bind voiptoken of push device
Parameters:
- token Device voip push token
- callBack [BMXErrorCode]
Example:
function getPushProfile
inline void getPushProfile(
final boolean forceRefresh,
final BMXDataCallBack< BMXPushUserProfile > callBack
)
Get push user details, force pull from server-side if forceRefresh == true
Parameters:
- forceRefresh Whether to force pull from server, automatically if local fetch failed
- callBack Profile of push user, initially passing in to a pointing-to-empty shared_ptr object, from which to retrieve the user profile after function returns
Example:
public void getPushProfile(boolean forceRefresh, final BMXDataCallBack<BMXPushUserProfile> callBack) {
mService.getPushProfile(forceRefresh, callBack);
function setTags
inline void setTags(
final TagList tags,
final String operationId,
final BMXCallBack callBack
)
Set tags of push user.
Parameters:
- tags User tag
- operationId Operation id. Corresponding notification reminder in callback notification.
- callBack [BMXErrorCode]
Example:
public void setTags(TagList tags, String operationId, BMXCallBack callBack) {
mService.setTags(tags, operationId, callBack);
function getTags
inline void getTags(
final TagList tags,
final String operationId,
final BMXCallBack callBack
)
Get tags of the push user.
Parameters:
- tags User tag
- operationId Operation id. Corresponding notification reminder in callback notification.
- callBack [BMXErrorCode]
Example:
public void getTags(TagList tags, String operationId, BMXCallBack callBack) {
mService.getTags(tags, operationId, callBack);
function deleteTags
inline void deleteTags(
final TagList tags,
final String operationId,
final BMXCallBack callBack
)
Delete tags of the push user.
Parameters:
- tags User tag to delete
- operationId Operation id. Corresponding notification reminder in callback notification.
- callBack [BMXErrorCode]
Example:
public void deleteTags(TagList tags, String operationId, BMXCallBack callBack) {
mService.deleteTags(tags, operationId, callBack);
function clearTags
inline void clearTags(
final String operationId,
final BMXCallBack callBack
)
Clear tags of the push user.
Parameters:
- operationId Operation id. Corresponding notification reminder in callback notification.
- callBack [BMXErrorCode]
Example:
public void clearTags(String operationId, BMXCallBack callBack) {
mService.clearTags(operationId, callBack);
function setBadge
inline void setBadge(
final int count,
final BMXCallBack callBack
)
Set unread badge for push user.
Parameters:
- count Unread badge count of user
- callBack [BMXErrorCode]
Example:
public void setBadge(int count, BMXCallBack callBack) {
mService.setBadge(count, callBack);
function setPushMode
inline void setPushMode(
final boolean enable,
final BMXCallBack callBack
)
Set push enabled state. Default enabled.
Parameters:
- enable Enabled state of push
- callBack [BMXErrorCode]
Example:
public void setPushMode(boolean enable, BMXCallBack callBack) {
mService.setPushMode(enable, callBack);
public void setPushMode(BMXCallBack callBack) {
mService.setPushMode(callBack);
function setPushMode
inline void setPushMode(
final BMXCallBack callBack
)
Example:
public void setPushMode(boolean enable, BMXCallBack callBack) {
mService.setPushMode(enable, callBack);
public void setPushMode(BMXCallBack callBack) {
mService.setPushMode(callBack);
function setPushTime
inline void setPushTime(
final int startHour,
final int endHour,
final BMXCallBack callBack
)
Set allowed push time.
Parameters:
- startHour Start time for allowed silent push (hour)
- endHour End time for allowed silent push (hour)
- callBack [BMXErrorCode]
Example:
public void setPushTime(int startHour, int endHour, BMXCallBack callBack) {
mService.setPushTime(startHour, endHour, callBack);
function setSilenceTime
inline void setSilenceTime(
final int startHour,
final int endHour,
final BMXCallBack callBack
)
Set the start and end time of silent push.
Parameters:
- startHour Start time for silent push (hour)
- endHour End time for silent push (hour)
- callBack [BMXErrorCode]
Example:
public void setSilenceTime(int startHour, int endHour, BMXCallBack callBack) {
mService.setSilenceTime(startHour, endHour, callBack);
function setRunBackgroundMode
inline void setRunBackgroundMode(
final boolean enable,
final BMXCallBack callBack
)
Set whether to run push in background, default false.
Parameters:
- enable Running state of push background
- callBack [BMXErrorCode]
Example:
public void setRunBackgroundMode(boolean enable, BMXCallBack callBack) {
mService.setRunBackgroundMode(enable, callBack);
public void setRunBackgroundMode(BMXCallBack callBack) {
mService.setRunBackgroundMode(callBack);
function setRunBackgroundMode
inline void setRunBackgroundMode(
final BMXCallBack callBack
)
Example:
public void setRunBackgroundMode(boolean enable, BMXCallBack callBack) {
mService.setRunBackgroundMode(enable, callBack);
public void setRunBackgroundMode(BMXCallBack callBack) {
mService.setRunBackgroundMode(callBack);
function setGeoFenceMode
inline void setGeoFenceMode(
final boolean enable,
final boolean isAllow,
final BMXCallBack callBack
)
Set whether to run push geo-fencing feature.
Parameters:
- enable Whether the geo-fencing function is running.
- isAllow Whether the user actively pops up a user location request.
- callBack [BMXErrorCode]
Example:
public void setGeoFenceMode(boolean enable, boolean isAllow, BMXCallBack callBack) {
mService.setGeoFenceMode(enable, isAllow, callBack);
public void setGeoFenceMode(boolean enable, BMXCallBack callBack) {
mService.setGeoFenceMode(enable, callBack);
public void setGeoFenceMode(BMXCallBack callBack) {
mService.setGeoFenceMode(callBack);
function setGeoFenceMode
inline void setGeoFenceMode(
final boolean enable,
final BMXCallBack callBack
)
Example:
public void setGeoFenceMode(boolean enable, boolean isAllow, BMXCallBack callBack) {
mService.setGeoFenceMode(enable, isAllow, callBack);
public void setGeoFenceMode(boolean enable, BMXCallBack callBack) {
mService.setGeoFenceMode(enable, callBack);
public void setGeoFenceMode(BMXCallBack callBack) {
mService.setGeoFenceMode(callBack);
function setGeoFenceMode
inline void setGeoFenceMode(
final BMXCallBack callBack
)
Example:
public void setGeoFenceMode(boolean enable, boolean isAllow, BMXCallBack callBack) {
mService.setGeoFenceMode(enable, isAllow, callBack);
public void setGeoFenceMode(boolean enable, BMXCallBack callBack) {
mService.setGeoFenceMode(enable, callBack);
public void setGeoFenceMode(BMXCallBack callBack) {
mService.setGeoFenceMode(callBack);
function clearNotification
inline void clearNotification(
final long notificationId
)
Clear notifications for the specified id.
Parameters:
- notificationId Notification id
Example:
public void clearNotification(long notificationId) {
mService.clearNotification(notificationId);
function clearAllNotifications
inline void clearAllNotifications()
Example:
public void clearAllNotifications() {
mService.clearAllNotifications();
function sendMessage
inline void sendMessage(
final String content
)
Send a push uplink message and notify the listener of a change in message status
Parameters:
- content Sent uplink push content
Example:
public void sendMessage(String content) {
mService.sendMessage(content);
function loadLocalPushMessages
inline void loadLocalPushMessages(
final long refMsgId,
final long size,
final BMXMessageList result,
final BMXPushService.PushDirection arg3,
final BMXCallBack callBack
)
Load push message stored in local database. Start with latest message if not specified
Parameters:
- refMsgId Start id for loading pushes
- size Maximum number of searched messages
- result List of loaded local pushes returned by database
- arg3 Direction of loading pushes, default to load earlier messages
Example:
public void loadLocalPushMessages(long refMsgId, long size, BMXMessageList result,
BMXCallBack callBack) {
mService.loadLocalPushMessages(refMsgId, size, result, callBack);
function loadLocalPushMessages
inline void loadLocalPushMessages(
final long refMsgId,
final long size,
final BMXMessageList result,
final BMXCallBack callBack
)
Example:
public void loadLocalPushMessages(long refMsgId, long size, BMXMessageList result,
BMXCallBack callBack) {
mService.loadLocalPushMessages(refMsgId, size, result, callBack);
function addPushListener
inline void addPushListener(
BMXPushServiceListener listener
)
Add push listener
Parameters:
- listener Push listener
Example:
public void addPushListener(BMXPushServiceListener listener) {
mService.addPushListener(listener);
function removePushListener
inline void removePushListener(
BMXPushServiceListener listener
)
Remove push listener
Parameters:
- listener Push listener
Example:
public void removePushListener(BMXPushServiceListener listener) {
mService.removePushListener(listener);
Updated on 2022-01-26 at 17:18:31 +0800