im::floo::floolib::BMXPushServiceListener
Public Functions
Name | |
---|---|
synchronized void | delete() |
void | swigReleaseOwnership() |
void | swigTakeOwnership() |
void | onPushStart(String bmxToken) Notification of push initialization complete. |
void | onPushStop() Notification of push feature stop. |
void | onCertRetrieved(String cert) Get push certificate after push initialization. |
void | onSetTags(String operationId) Set callback of user push success. |
void | onGetTags(String operationId) Get callback of user push success. |
void | onDeleteTags(String operationId) Delete callback of user push success. |
void | onClearTags(String operationId) Clear callback of user push success. |
void | onReceivePush(BMXMessageList list) New push notification received. |
void | onStatusChanged(BMXMessage msg, [BMXErrorCode] error) Send notification of push uplink message status change. |
BMXPushServiceListener() | |
void | registerPushService(BMXPushService service) |
Protected Functions
Name | |
---|---|
BMXPushServiceListener(long cPtr, boolean cMemoryOwn) | |
void | finalize() |
void | swigDirectorDisconnect() |
long | getCPtr(BMXPushServiceListener obj) |
Protected Attributes
Name | |
---|---|
transient boolean | swigCMemOwn |
Public Functions Documentation
function delete
inline synchronized void delete()
Example:
function swigReleaseOwnership
inline void swigReleaseOwnership()
Example:
function swigTakeOwnership
inline void swigTakeOwnership()
Example:
function onPushStart
inline void onPushStart(
String bmxToken
)
Notification of push initialization complete.
Parameters:
- bmxToken bmxToken used in current push
Example:
public void onPushStart(String bmxToken) {
super.onPushStart(bmxToken);
Log.d(TAG, "onPushStart" + bmxToken);
}
function onPushStop
inline void onPushStop()
Notification of push feature stop.
Example:
public void onPushStop() {
super.onPushStop();
Log.d(TAG, "onPushStop");
}
function onCertRetrieved
inline void onCertRetrieved(
String cert
)
Get push certificate after push initialization.
Parameters:
- cert Push certificate obtained from server
Example:
public void onCertRetrieved(String cert) {
super.onCertRetrieved(cert);
Log.d(TAG, "onCertRetrieved" + cert);
BaseManager.getBMXClient().getSDKConfig().setPushCertName(cert);
PushClientMgr.getManager().register(MaxIMPushService.this);
}
function onSetTags
inline void onSetTags(
String operationId
)
Set callback of user push success.
Parameters:
- operationId Operation id
Example:
public void onSetTags(String operationId) {
super.onSetTags(operationId);
Log.d(TAG, "onSetTags" + operationId);
}
function onGetTags
inline void onGetTags(
String operationId
)
Get callback of user push success.
Parameters:
- operationId Operation id
Example:
public void onGetTags(String operationId) {
super.onGetTags(operationId);
Log.d(TAG, "onGetTags" + operationId);
}
function onDeleteTags
inline void onDeleteTags(
String operationId
)
Delete callback of user push success.
Parameters:
- operationId Operation id
Example:
public void onDeleteTags(String operationId) {
super.onDeleteTags(operationId);
Log.d(TAG, "onDeleteTags" + operationId);
}
function onClearTags
inline void onClearTags(
String operationId
)
Clear callback of user push success.
Parameters:
- operationId Operation id
Example:
public void onClearTags(String operationId) {
super.onClearTags(operationId);
Log.d(TAG, "onClearTags" + operationId);
}
function onReceivePush
inline void onReceivePush(
BMXMessageList list
)
New push notification received.
Parameters:
- list Push notification list
Example:
public void onReceivePush(BMXMessageList list) {
super.onReceivePush(list);
Log.d(TAG, "onReceivePush");
//弹出Notification
if (list != null && !list.isEmpty()) {
BMXMessage message = list.get(0);
if (message != null) {
String title = !TextUtils.isEmpty(message.senderName()) ? message.senderName() : getString(R.string.app_name);
String content = ChatUtils.getInstance().getMessageDesc(getApplicationContext(), message);
Intent intent = getPackageManager().getLaunchIntentForPackage(getApplication().getPackageName());
NotificationUtils.getInstance().showNotify(MsgConstants.ChannelImportance.PRIVATE, title, content, intent);
}
}
}
function onStatusChanged
inline void onStatusChanged(
BMXMessage msg,
BMXErrorCode error
)
Send notification of push uplink message status change.
Parameters:
- msg Uplink message with state change
- error State error code
Example:
public void onStatusChanged(BMXMessage msg, BMXErrorCode error) {
super.onStatusChanged(msg, error);
Log.d(TAG, "onStatusChanged" + msg.content());
}
function BMXPushServiceListener
inline BMXPushServiceListener()
Example:
function registerPushService
inline void registerPushService(
BMXPushService service
)
Protected Functions Documentation
Example:
function BMXPushServiceListener
inline BMXPushServiceListener(
long cPtr,
boolean cMemoryOwn
)
Example:
function finalize
inline void finalize()
Example:
function swigDirectorDisconnect
inline void swigDirectorDisconnect()
Example:
function getCPtr
static inline long getCPtr(
BMXPushServiceListener obj
)
Protected Attributes Documentation
variable swigCMemOwn
transient boolean swigCMemOwn;
Example:
Updated on 2022-01-26 at 17:18:31 +0800