本文整理汇总了Java中io.rong.message.InformationNotificationMessage类的典型用法代码示例。如果您正苦于以下问题:Java InformationNotificationMessage类的具体用法?Java InformationNotificationMessage怎么用?Java InformationNotificationMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InformationNotificationMessage类属于io.rong.message包,在下文中一共展示了InformationNotificationMessage类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onStatusChange
import io.rong.message.InformationNotificationMessage; //导入依赖的package包/类
@Override
public void onStatusChange(final RealTimeLocationConstant.RealTimeLocationStatus status) {
currentLocationStatus = status;
EventBus.getDefault().post(status);
if (status == RealTimeLocationConstant.RealTimeLocationStatus.RC_REAL_TIME_LOCATION_STATUS_IDLE) {
hideRealTimeBar();
RealTimeLocationConstant.RealTimeLocationErrorCode errorCode = RongIMClient.getInstance().getRealTimeLocation(mConversationType, mTargetId);
if (errorCode == RealTimeLocationConstant.RealTimeLocationErrorCode.RC_REAL_TIME_LOCATION_SUCCESS) {
RongIM.getInstance().getRongIMClient().insertMessage(mConversationType, mTargetId, RongIM.getInstance().getRongIMClient().getCurrentUserId(), InformationNotificationMessage.obtain("位置共享已结束"));
}
} else if (status == RealTimeLocationConstant.RealTimeLocationStatus.RC_REAL_TIME_LOCATION_STATUS_OUTGOING) {//发自定义消息
showRealTimeLocationBar(status);
} else if (status == RealTimeLocationConstant.RealTimeLocationStatus.RC_REAL_TIME_LOCATION_STATUS_INCOMING) {
showRealTimeLocationBar(status);
} else if (status == RealTimeLocationConstant.RealTimeLocationStatus.RC_REAL_TIME_LOCATION_STATUS_CONNECTED) {
showRealTimeLocationBar(status);
}
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:24,代码来源:ConversationActivity.java
示例2: onCallDisconnected
import io.rong.message.InformationNotificationMessage; //导入依赖的package包/类
@Override
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) {
isFinishing = true;
if (reason == null || callSession == null) {
RLog.e(TAG, "onCallDisconnected. callSession is null!");
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
return;
}
InformationNotificationMessage informationMessage;
if (reason.equals(RongCallCommon.CallDisconnectedReason.NO_RESPONSE)) {
informationMessage = InformationNotificationMessage.obtain(RongContext.getInstance().getString(R.string.rc_voip_video_no_response));
} else {
informationMessage = InformationNotificationMessage.obtain(RongContext.getInstance().getString(R.string.rc_voip_video_ended));
}
RongIM.getInstance().insertMessage(callSession.getConversationType(), callSession.getTargetId(), callSession.getCallerUserId(), informationMessage, null);
stopRing();
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
super.onCallDisconnected(callSession, reason);
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:32,代码来源:MultiVideoCallActivity.java
示例3: onCallDisconnected
import io.rong.message.InformationNotificationMessage; //导入依赖的package包/类
@Override
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) {
super.onCallDisconnected(callSession, reason);
isFinishing = true;
if (reason == null || callSession == null) {
RLog.e(TAG, "onCallDisconnected. callSession is null!");
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
return;
}
InformationNotificationMessage informationMessage;
if (reason.equals(RongCallCommon.CallDisconnectedReason.NO_RESPONSE)) {
informationMessage = InformationNotificationMessage.obtain(RongContext.getInstance().getString(R.string.rc_voip_audio_no_response));
} else {
informationMessage = InformationNotificationMessage.obtain(RongContext.getInstance().getString(R.string.rc_voip_audio_ended));
}
RongIM.getInstance().insertMessage(callSession.getConversationType(), callSession.getTargetId(), callSession.getCallerUserId(), informationMessage, null);
stopRing();
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:32,代码来源:MultiAudioCallActivity.java
示例4: onCallDisconnected
import io.rong.message.InformationNotificationMessage; //导入依赖的package包/类
@Override
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) {
if (reason == null || callSession == null) {
RLog.e(TAG, "onCallDisconnected. callSession is null!");
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
return;
}
InformationNotificationMessage informationMessage;
if (reason.equals(RongCallCommon.CallDisconnectedReason.NO_RESPONSE)) {
informationMessage = InformationNotificationMessage.obtain(RongContext.getInstance().getString(R.string.rc_voip_video_no_response));
} else {
informationMessage = InformationNotificationMessage.obtain(RongContext.getInstance().getString(R.string.rc_voip_video_ended));
}
RongIM.getInstance().insertMessage(callSession.getConversationType(), callSession.getTargetId(), callSession.getCallerUserId(), informationMessage, null);
stopRing();
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
super.onCallDisconnected(callSession, reason);
}
开发者ID:rongcloud,项目名称:callkit-android,代码行数:31,代码来源:MultiVideoCallActivity.java
示例5: onCallDisconnected
import io.rong.message.InformationNotificationMessage; //导入依赖的package包/类
@Override
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) {
super.onCallDisconnected(callSession, reason);
if (reason == null || callSession == null) {
RLog.e(TAG, "onCallDisconnected. callSession is null!");
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
return;
}
InformationNotificationMessage informationMessage;
if (reason.equals(RongCallCommon.CallDisconnectedReason.NO_RESPONSE)) {
informationMessage = InformationNotificationMessage.obtain(RongContext.getInstance().getString(R.string.rc_voip_audio_no_response));
} else {
informationMessage = InformationNotificationMessage.obtain(RongContext.getInstance().getString(R.string.rc_voip_audio_ended));
}
RongIM.getInstance().insertMessage(callSession.getConversationType(), callSession.getTargetId(), callSession.getCallerUserId(), informationMessage, null);
stopRing();
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
}
开发者ID:rongcloud,项目名称:callkit-android,代码行数:31,代码来源:MultiAudioCallActivity.java
示例6: getMessageContent
import io.rong.message.InformationNotificationMessage; //导入依赖的package包/类
public static String getMessageContent(MessageContent messageContent) {
String content = "";
if (messageContent instanceof TextMessage) {//文本消息
TextMessage textMessage = (TextMessage) messageContent;
content = textMessage.getContent();
} else if (messageContent instanceof ImageMessage) {//图片消息
ImageMessage imageMessage = (ImageMessage) messageContent;
content = PlatformUtil.getInstance().getString(R.string.im_default_message_image);
} else if (messageContent instanceof VoiceMessage) {//语音消息
VoiceMessage voiceMessage = (VoiceMessage) messageContent;
content = PlatformUtil.getInstance().getString(R.string.im_default_message_voice);
} else if (messageContent instanceof RichContentMessage) {//图文消息
RichContentMessage richContentMessage = (RichContentMessage) messageContent;
content = PlatformUtil.getInstance().getString(R.string.im_default_message_rich_text);
} else if (messageContent instanceof LocationMessage) {//图文消息
LocationMessage location = (LocationMessage) messageContent;
content = PlatformUtil.getInstance().getString(R.string.im_default_message_location_with_string_in, location.getPoi());
} else if (messageContent instanceof InformationNotificationMessage) {//小灰条消息
InformationNotificationMessage informationNotificationMessage = (InformationNotificationMessage) messageContent;
LogHelper.e(TAG, "onReceived-informationNotificationMessage:" + informationNotificationMessage.getMessage());
content = PlatformUtil.getInstance().getString(R.string.im_default_message_notificataion);
} else {
if (messageContent == null) {
content = PlatformUtil.getInstance().getString(R.string.send_message_with_name_below, "");
} else {
content = null;
}
LogHelper.e("omg", " receive push message other" + messageContent);
// content = "[通知]";
}
return content;
}
开发者ID:MoonRune,项目名称:CuiTrip,代码行数:34,代码来源:RongCloudEvent.java
示例7: translateMessageContent
import io.rong.message.InformationNotificationMessage; //导入依赖的package包/类
public static TranslatedMessageContent translateMessageContent(MessageContent msgContent) {
TranslatedMessageContent content = null;
if (msgContent == null)
return null;
if (msgContent instanceof TextMessage) {
content = new TranslatedTextMessage(msgContent);
} else if (msgContent instanceof ImageMessage) {
content = new TranslatedImageMessage(msgContent);
} else if (msgContent instanceof VoiceMessage) {
content = new TranslatedVoiceMessage(msgContent);
} else if (msgContent instanceof RichContentMessage) {
content = new TranslatedRichContentMessage(msgContent);
} else if (msgContent instanceof CommandNotificationMessage) {
content = new TranslatedCommandNotificationMessage(msgContent);
} else if (msgContent instanceof LocationMessage) {
content = new TranslatedLocationMessage(msgContent);
} else if (msgContent instanceof InformationNotificationMessage) {
content = new TranslatedInformationNtfMessage(msgContent);
} else if (msgContent instanceof DiscussionNotificationMessage) {
content = new TranslatedDiscussionNtfMessage(msgContent);
} else if (msgContent instanceof CommandMessage) {
content = new TranslatedCommandMessage(msgContent);
} else if (msgContent instanceof ContactNotificationMessage) {
content = new TranslatedContactNtfMessage(msgContent);
} else if (msgContent instanceof ProfileNotificationMessage) {
content = new TranslatedProfileNtfMessage(msgContent);
} else if (msgContent instanceof GroupNotificationMessage) {
content = new TranslatedGrpNtfMessage(msgContent);
}
return content;
}
开发者ID:rongcloud,项目名称:apicloud-module-imlib-android,代码行数:33,代码来源:TranslatedMessage.java
示例8: TranslatedInformationNtfMessage
import io.rong.message.InformationNotificationMessage; //导入依赖的package包/类
public TranslatedInformationNtfMessage(MessageContent content) {
InformationNotificationMessage message = (InformationNotificationMessage)content;
this.message = message.getMessage() == null ? "" : message.getMessage();
this.extra = message.getExtra() == null ? "" : message.getExtra();
}
开发者ID:rongcloud,项目名称:apicloud-module-imlib-android,代码行数:6,代码来源:TranslatedInformationNtfMessage.java
示例9: onReceived
import io.rong.message.InformationNotificationMessage; //导入依赖的package包/类
/**
* 接收消息的监听器:OnReceiveMessageListener 的回调方法,接收到消息后执行。
*
* @param message 接收到的消息的实体信息。
* @param left 剩余未拉取消息数目。
*/
@Override
public boolean onReceived(Message message, int left) {
MessageContent messageContent = message.getContent();
if (messageContent instanceof TextMessage) {//文本消息
TextMessage textMessage = (TextMessage) messageContent;
textMessage.getExtra();
Log.d(TAG, "onReceived-TextMessage:" + textMessage.getContent());
} else if (messageContent instanceof ImageMessage) {//图片消息
ImageMessage imageMessage = (ImageMessage) messageContent;
Log.d(TAG, "onReceived-ImageMessage:" + imageMessage.getRemoteUri());
} else if (messageContent instanceof VoiceMessage) {//语音消息
VoiceMessage voiceMessage = (VoiceMessage) messageContent;
Log.d(TAG, "onReceived-voiceMessage:" + voiceMessage.getUri().toString());
} else if (messageContent instanceof RichContentMessage) {//图文消息
RichContentMessage richContentMessage = (RichContentMessage) messageContent;
Log.d(TAG, "onReceived-RichContentMessage:" + richContentMessage.getContent());
} else if (messageContent instanceof InformationNotificationMessage) {//小灰条消息
InformationNotificationMessage informationNotificationMessage = (InformationNotificationMessage) messageContent;
Log.e(TAG, "onReceived-informationNotificationMessage:" + informationNotificationMessage.getMessage());
//if (FlyingIMContext.getInstance() != null)
// getFriendByUserIdHttpRequest = FlyingIMContext.getInstance().getUserInfoByUserId(message.getSenderUserId(), (ApiCallback<User>) this);
}
/*else if (messageContent instanceof AgreedFriendRequestMessage) {//好友添加成功消息
AgreedFriendRequestMessage agreedFriendRequestMessage = (AgreedFriendRequestMessage) messageContent;
Log.d(TAG, "onReceived-deAgreedFriendRequestMessage:" + agreedFriendRequestMessage.getMessage());
Intent in = new Intent();
in.setAction(MainActivity.ACTION_DMEO_AGREE_REQUEST);
in.putExtra("AGREE_REQUEST", true);
mContext.sendBroadcast(in);
} else if (messageContent instanceof ContactNotificationMessage) {//好友添加消息
ContactNotificationMessage contactContentMessage = (ContactNotificationMessage) messageContent;
Log.d(TAG, "onReceived-ContactNotificationMessage:getExtra;" + contactContentMessage.getExtra());
Log.d(TAG, "onReceived-ContactNotificationMessage:+getmessage:" + contactContentMessage.getMessage().toString());
Intent in = new Intent();
in.setAction(MainActivity.ACTION_DMEO_RECEIVE_MESSAGE);
in.putExtra("rongCloud", contactContentMessage);
in.putExtra("has_message", true);
mContext.sendBroadcast(in);
}
*/else if (messageContent instanceof DiscussionNotificationMessage) {//讨论组通知消息
DiscussionNotificationMessage discussionNotificationMessage = (DiscussionNotificationMessage) messageContent;
Log.d(TAG, "onReceived-discussionNotificationMessage:getExtra;" + discussionNotificationMessage.getOperator());
setDiscussionName(message.getTargetId());
} else {
Log.d(TAG, "onReceived-其他消息,自己来判断处理");
}
//通知更新菜单
Intent in = new Intent();
in.setAction(MainActivity.ACTION_RONGCLOUD_RECEIVE_MESSAGE);
in.putExtra("rongMessage", message);
in.putExtra("has_message", true);
mContext.sendBroadcast(in);
return false;
}
开发者ID:birdcopy,项目名称:Android-Birdcopy-Application,代码行数:74,代码来源:RongCloudEvent.java
注:本文中的io.rong.message.InformationNotificationMessage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论