本文整理汇总了Java中io.rong.common.RLog.e方法的典型用法代码示例。如果您正苦于以下问题:Java RLog.e方法的具体用法?Java RLog.e怎么用?Java RLog.e使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.rong.common.RLog
的用法示例。
在下文中一共展示了RLog.e方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCallDisconnected
import io.rong.common.RLog; //导入方法依赖的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);
}
示例2: onCallDisconnected
import io.rong.common.RLog; //导入方法依赖的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();
}
});
}
示例3: onCallDisconnected
import io.rong.common.RLog; //导入方法依赖的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);
}
示例4: onCallDisconnected
import io.rong.common.RLog; //导入方法依赖的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();
}
});
}
示例5: build
import io.rong.common.RLog; //导入方法依赖的package包/类
public Builder build(Context context) {
if (context == null) {
throw new NullPointerException("context == null");
}
Intent intent = new Intent();
intent.setClass(context, UpdateService.class);
intent.putExtra(URL, downloadUrl);
if (icoResId == DEFAULT_RES_ID) {
icoResId = getIcon(context);
}
if (icoSmallResId == DEFAULT_RES_ID) {
icoSmallResId = icoResId;
}
intent.putExtra(ICO_RES_ID, icoResId);
intent.putExtra(STORE_DIR, storeDir);
intent.putExtra(ICO_SMALL_RES_ID, icoSmallResId);
intent.putExtra(UPDATE_PROGRESS, updateProgress);
intent.putExtra(DOWNLOAD_NOTIFICATION_FLAG, downloadNotificationFlag);
intent.putExtra(DOWNLOAD_SUCCESS_NOTIFICATION_FLAG, downloadSuccessNotificationFlag);
intent.putExtra(DOWNLOAD_ERROR_NOTIFICATION_FLAG, downloadErrorNotificationFlag);
intent.putExtra(IS_SEND_BROADCAST, isSendBroadcast);
try {
context.startService(intent);
} catch (SecurityException e) {
RLog.e(TAG, "SecurityException. Failed to start pushService.");
}
return this;
}
示例6: onCallDisconnected
import io.rong.common.RLog; //导入方法依赖的package包/类
@Override
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) {
super.onCallDisconnected(callSession, reason);
String senderId;
String extra = "";
isFinishing = true;
if (callSession == null) {
RLog.e(TAG, "onCallDisconnected. callSession is null!");
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
return;
}
senderId = callSession.getInviterUserId();
switch (reason) {
case HANGUP:
case REMOTE_HANGUP:
int time = getTime();
if (time >= 3600) {
extra = String.format("%d:%02d:%02d", time / 3600, (time % 3600) / 60, (time % 60));
} else {
extra = String.format("%02d:%02d", (time % 3600) / 60, (time % 60));
}
break;
case OTHER_DEVICE_HAD_ACCEPTED:
showShortToast(getString(R.string.rc_voip_call_other));
break;
}
if (!TextUtils.isEmpty(senderId)) {
CallSTerminateMessage message = new CallSTerminateMessage();
message.setReason(reason);
message.setMediaType(callSession.getMediaType());
message.setExtra(extra);
if (senderId.equals(callSession.getSelfUserId())) {
message.setDirection("MO");
RongIM.getInstance().insertOutgoingMessage(Conversation.ConversationType.PRIVATE, callSession.getTargetId(), io.rong.imlib.model.Message.SentStatus.SENT, message, null);
} else {
message.setDirection("MT");
io.rong.imlib.model.Message.ReceivedStatus receivedStatus = new io.rong.imlib.model.Message.ReceivedStatus(0);
RongIM.getInstance().insertIncomingMessage(Conversation.ConversationType.PRIVATE, callSession.getTargetId(), senderId, receivedStatus, message, null);
}
}
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
}
示例7: onItemLongClick
import io.rong.common.RLog; //导入方法依赖的package包/类
@Override
public void onItemLongClick(final View view, int position, ContactMessage content, final UIMessage message) {
String[] items;
long deltaTime = RongIM.getInstance().getDeltaTime();
long normalTime = System.currentTimeMillis() - deltaTime;
boolean enableMessageRecall = false;
int messageRecallInterval = -1;
try {
enableMessageRecall = RongContext.getInstance().getResources().getBoolean(R.bool.rc_enable_message_recall);
messageRecallInterval = RongContext.getInstance().getResources().getInteger(R.integer.rc_message_recall_interval);
} catch (Resources.NotFoundException e) {
RLog.e(TAG, "rc_message_recall_interval not configure in rc_config.xml");
e.printStackTrace();
}
if (message.getSentStatus().equals(Message.SentStatus.SENDING) && message.getProgress() < 100) {
return;
}
if (message.getSentStatus().equals(Message.SentStatus.SENT)
&& enableMessageRecall
&& (normalTime - message.getSentTime()) <= messageRecallInterval * 1000
&& message.getSenderUserId().equals(RongIM.getInstance().getCurrentUserId())
&& !message.getConversationType().equals(Conversation.ConversationType.CUSTOMER_SERVICE)
&& !message.getConversationType().equals(Conversation.ConversationType.APP_PUBLIC_SERVICE)
&& !message.getConversationType().equals(Conversation.ConversationType.PUBLIC_SERVICE)
&& !message.getConversationType().equals(Conversation.ConversationType.SYSTEM)
&& !message.getConversationType().equals(Conversation.ConversationType.CHATROOM)) {
items = new String[]{view.getContext().getResources().getString(R.string.rc_dialog_item_message_delete), view.getContext().getResources().getString(R.string.rc_dialog_item_message_recall)};
} else {
items = new String[]{view.getContext().getResources().getString(R.string.rc_dialog_item_message_delete)};
}
OptionsPopupDialog.newInstance(view.getContext(), items).setOptionsPopupDialogListener(new OptionsPopupDialog.OnOptionsItemClickedListener() {
@Override
public void onOptionsItemClicked(int which) {
if (which == 0) {
RongIM.getInstance().cancelSendMediaMessage(message.getMessage(), null);
RongIM.getInstance().deleteMessages(new int[]{message.getMessageId()}, null);
} else if (which == 1) {
RongIM.getInstance().recallMessage(message.getMessage(), getPushContent(view.getContext(), message));
}
}
}).show();
}
示例8: onCallDisconnected
import io.rong.common.RLog; //导入方法依赖的package包/类
@Override
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) {
super.onCallDisconnected(callSession, reason);
String senderId;
String extra = "";
isFinishing = true;
if (callSession == null) {
RLog.e(TAG, "onCallDisconnected. callSession is null!");
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
return;
}
senderId = callSession.getInviterUserId();
switch (reason) {
case HANGUP:
case REMOTE_HANGUP:
int time = getTime();
if (time >= 3600) {
extra = String.format("%d:%02d:%02d", time / 3600, (time % 3600) / 60, (time % 60));
} else {
extra = String.format("%02d:%02d", (time % 3600) / 60, (time % 60));
}
break;
}
if (!TextUtils.isEmpty(senderId)) {
CallSTerminateMessage message = new CallSTerminateMessage();
message.setReason(reason);
message.setMediaType(callSession.getMediaType());
message.setExtra(extra);
if (senderId.equals(callSession.getSelfUserId())) {
message.setDirection("MO");
} else {
message.setDirection("MT");
}
RongIM.getInstance().insertMessage(Conversation.ConversationType.PRIVATE, callSession.getTargetId(), senderId, message, null);
}
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
}
示例9: onCallDisconnected
import io.rong.common.RLog; //导入方法依赖的package包/类
@Override
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) {
super.onCallDisconnected(callSession, reason);
String senderId;
String extra = "";
stopRing();
if (callSession == null) {
RLog.e(TAG, "onCallDisconnected. callSession is null!");
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
return;
}
senderId = callSession.getInviterUserId();
switch (reason) {
case HANGUP:
case REMOTE_HANGUP:
int time = getTime();
if (time >= 3600) {
extra = String.format("%d:%02d:%02d", time / 3600, (time % 3600) / 60, (time % 60));
} else {
extra = String.format("%02d:%02d", (time % 3600) / 60, (time % 60));
}
break;
}
if (!TextUtils.isEmpty(senderId)) {
CallSTerminateMessage message = new CallSTerminateMessage();
message.setReason(reason);
message.setMediaType(callSession.getMediaType());
message.setExtra(extra);
if (senderId.equals(callSession.getSelfUserId())) {
message.setDirection("MO");
} else {
message.setDirection("MT");
}
RongIM.getInstance().insertMessage(Conversation.ConversationType.PRIVATE, callSession.getTargetId(), senderId, message, null);
}
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
}
示例10: onCallDisconnected
import io.rong.common.RLog; //导入方法依赖的package包/类
@Override
public void onCallDisconnected(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason) {
super.onCallDisconnected(callSession, reason);
String senderId;
String extra = "";
isFinishing = true;
if (callSession == null) {
RLog.e(TAG, "onCallDisconnected. callSession is null!");
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
return;
}
senderId = callSession.getInviterUserId();
switch (reason) {
case HANGUP:
case REMOTE_HANGUP:
long time = getTime();
if (time >= 3600) {
extra = String.format("%d:%02d:%02d", time / 3600, (time % 3600) / 60, (time % 60));
} else {
extra = String.format("%02d:%02d", (time % 3600) / 60, (time % 60));
}
break;
case OTHER_DEVICE_HAD_ACCEPTED:
showShortToast(getString(R.string.rc_voip_call_other));
break;
}
if (!TextUtils.isEmpty(senderId)) {
CallSTerminateMessage message = new CallSTerminateMessage();
message.setReason(reason);
message.setMediaType(callSession.getMediaType());
message.setExtra(extra);
if (senderId.equals(callSession.getSelfUserId())) {
message.setDirection("MO");
RongIM.getInstance().insertOutgoingMessage(Conversation.ConversationType.PRIVATE, callSession.getTargetId(), io.rong.imlib.model.Message.SentStatus.SENT, message, null);
} else {
message.setDirection("MT");
io.rong.imlib.model.Message.ReceivedStatus receivedStatus = new io.rong.imlib.model.Message.ReceivedStatus(0);
receivedStatus.setRead();
RongIM.getInstance().insertIncomingMessage(Conversation.ConversationType.PRIVATE, callSession.getTargetId(), senderId, receivedStatus, message, null);
}
}
postRunnableDelay(new Runnable() {
@Override
public void run() {
finish();
}
});
}