• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java UploadListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中cn.bmob.im.inteface.UploadListener的典型用法代码示例。如果您正苦于以下问题:Java UploadListener类的具体用法?Java UploadListener怎么用?Java UploadListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UploadListener类属于cn.bmob.im.inteface包,在下文中一共展示了UploadListener类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: sendVoiceMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
private void sendVoiceMessage(String local, int length) {
    manager.sendVoiceMessage(mTargetUser, local, length,
            new UploadListener() {

                @Override
                public void onStart(BmobMsg msg) {
                    // TODO Auto-generated method stub
                    refreshMessage(msg);
                }

                @Override
                public void onSuccess() {
                    // TODO Auto-generated method stub
                    mAdapter.notifyDataSetChanged();
                }

                @Override
                public void onFailure(int error, String arg1) {
                    // TODO Auto-generated method stub
                    Log.e("BB","上传语音失败 -->arg1:" + arg1);
                    mAdapter.notifyDataSetChanged();
                }
            });
}
 
开发者ID:JoeSteven,项目名称:BiBi,代码行数:25,代码来源:ChatActivity.java


示例2: sendVoiceMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * ����������Ϣ
 * @param recordFilePath
 * @param recordTime
 */
public void sendVoiceMessage(String localPath, int length) {
	manager.sendVoiceMessage(targetUser, localPath, length, new UploadListener() {
		
		@Override
		public void onSuccess() {
			mAdapter.notifyDataSetChanged();
		}
		
		@Override
		public void onStart(BmobMsg msg) {
			refreshMessage(msg);
		}
		
		@Override
		public void onFailure(int error, String arg1) {
			showLog("�ϴ�����ʧ�ܣ�arg1:" + arg1);
			mAdapter.notifyDataSetChanged();
		}
	});
}
 
开发者ID:JasonGaoH,项目名称:enjoychat,代码行数:26,代码来源:ChatActivity.java


示例3: sendVoiceMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 发送语音消息
 * 
 * @Title: sendImageMessage
 * @Description: TODO
 * @param @param localPath
 * @return void
 * @throws
 */
private void sendVoiceMessage(String local, int length) {
	manager.sendVoiceMessage(targetUser, local, length,
			new UploadListener() {

				@Override
				public void onStart(BmobMsg msg) {
					// TODO Auto-generated method stub
					refreshMessage(msg);
				}

				@Override
				public void onSuccess() {
					// TODO Auto-generated method stub
					mAdapter.notifyDataSetChanged();
				}

				@Override
				public void onFailure(int error, String arg1) {
					// TODO Auto-generated method stub
					ShowLog("上传语音失败 -->arg1:" + arg1);
					mAdapter.notifyDataSetChanged();
				}
			});
}
 
开发者ID:nEdAy,项目名称:XPPLE_IM,代码行数:34,代码来源:ChatActivity.java


示例4: sendVoiceMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 
 * @Title: sendImageMessage
 * @Description: TODO
 * @param @param localPath
 * @return void
 * @throws
 */
private void sendVoiceMessage(String local, int length) {
	manager.sendVoiceMessage(targetUser, local, length,
			new UploadListener() {

				@Override
				public void onStart(BmobMsg msg) {
					// TODO Auto-generated method stub
					refreshMessage(msg);
				}

				@Override
				public void onSuccess() {
					// TODO Auto-generated method stub
					mAdapter.notifyDataSetChanged();
				}

				@Override
				public void onFailure(int error, String arg1) {
					// TODO Auto-generated method stub
					ShowLog("上传语音失败 -->arg1:" + arg1);
					mAdapter.notifyDataSetChanged();
				}
			});
}
 
开发者ID:HuTianQi,项目名称:QQ,代码行数:33,代码来源:ChatActivity.java


示例5: sendVoiceMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * ����������Ϣ
 * @Title: sendImageMessage
 * @Description: TODO
 * @param @param localPath
 * @return void
 * @throws
 */
private void sendVoiceMessage(String local, int length) {
	manager.sendVoiceMessage(targetUser, local, length,
			new UploadListener() {

				@Override
				public void onStart(BmobMsg msg) {
					// TODO Auto-generated method stub
					refreshMessage(msg);
				}

				@Override
				public void onSuccess() {
					// TODO Auto-generated method stub
					mAdapter.notifyDataSetChanged();
				}

				@Override
				public void onFailure(int error, String arg1) {
					// TODO Auto-generated method stub
					ShowLog("�ϴ�����ʧ�� -->arg1��" + arg1);
					mAdapter.notifyDataSetChanged();
				}
			});
}
 
开发者ID:liuyanggithub,项目名称:Hi,代码行数:33,代码来源:ChatActivity.java


示例6: sendVoiceMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 发送语音消息
 * @Title: sendImageMessage
 * @Description: TODO
 * @param @param localPath
 * @return void
 * @throws
 */
private void sendVoiceMessage(String local, int length) {
	manager.sendVoiceMessage(targetUser, local, length, new UploadListener() {

		@Override
		public void onStart(BmobMsg msg) {
			refreshMessage(msg);
		}

		@Override
		public void onSuccess() {
			mAdapter.notifyDataSetChanged();
		}

		@Override
		public void onFailure(int error, String arg1) {
			L.i("上传语音失败 -->arg1:" + arg1);
			mAdapter.notifyDataSetChanged();
		}
	});
}
 
开发者ID:hanks-zyh,项目名称:Conquer,代码行数:29,代码来源:ChatActivity.java


示例7: sendVoiceMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 发送语音消息
 *
 * @param @param localPath
 * @return void
 * @throws
 * @Title: sendImageMessage
 */
private void sendVoiceMessage(String local, int length) {
    mChatManager.sendVoiceMessage(targetUser, local, length,
            new UploadListener() {

                @Override
                public void onStart(BmobMsg msg) {

                    refreshMessage(msg);
                }

                @Override
                public void onSuccess() {

                    mAdapter.notifyDataSetChanged();
                }

                @Override
                public void onFailure(int error, String arg1) {

                    LogE("上传语音失败 -->arg1:" + arg1);
                    mAdapter.notifyDataSetChanged();
                }
            }
    );
}
 
开发者ID:klob,项目名称:Diandi1.20,代码行数:34,代码来源:ChatActivity.java


示例8: sendImageMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * Ĭ�����ϴ�����ͼƬ��֮�����ʾ����
 * @param local
 */
private void sendImageMessage(String local) {
	if (layout_more.getVisibility() == View.VISIBLE) {
		layout_more.setVisibility(View.GONE);
		layout_add.setVisibility(View.GONE);
		layout_emo.setVisibility(View.GONE);
	}
	manager.sendImageMessage(targetUser, local, new UploadListener() {

		@Override
		public void onStart(BmobMsg msg) {
			showLog("��ʼ�ϴ�onStart��" + msg.getContent() + ",״̬��"
					+ msg.getStatus());
			refreshMessage(msg);
		}

		@Override
		public void onSuccess() {
			mAdapter.notifyDataSetChanged();
		}

		@Override
		public void onFailure(int error, String arg1) {
			showLog("�ϴ�ʧ�� -->arg1��" + arg1);
			mAdapter.notifyDataSetChanged();
		}
	});

}
 
开发者ID:JasonGaoH,项目名称:enjoychat,代码行数:33,代码来源:ChatActivity.java


示例9: sendImageMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 默认先上传本地图片,之后才显示出来 sendImageMessage
 * 
 * @Title: sendImageMessage
 * @Description: TODO
 * @param @param localPath
 * @return void
 * @throws
 */
private void sendImageMessage(String local) {
	if (layout_more.getVisibility() == View.VISIBLE) {
		layout_more.setVisibility(View.GONE);
		layout_add.setVisibility(View.GONE);
		layout_emo.setVisibility(View.GONE);
	}
	manager.sendImageMessage(targetUser, local, new UploadListener() {

		@Override
		public void onStart(BmobMsg msg) {
			// TODO Auto-generated method stub
			ShowLog("开始上传onStart:" + msg.getContent() + ",状态:"
					+ msg.getStatus());
			refreshMessage(msg);
		}

		@Override
		public void onSuccess() {
			// TODO Auto-generated method stub
			mAdapter.notifyDataSetChanged();
		}

		@Override
		public void onFailure(int error, String arg1) {
			// TODO Auto-generated method stub
			ShowLog("上传失败 -->arg1:" + arg1);
			mAdapter.notifyDataSetChanged();
		}
	});
}
 
开发者ID:nEdAy,项目名称:XPPLE_IM,代码行数:40,代码来源:ChatActivity.java


示例10: sendImageMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * sendImageMessage
 * @Title: sendImageMessage
 * @Description: TODO
 * @param @param localPath
 * @return void
 * @throws
 */
private void sendImageMessage(String local) {
	if (layout_more.getVisibility() == View.VISIBLE) {
		layout_more.setVisibility(View.GONE);
		layout_add.setVisibility(View.GONE);
		layout_emo.setVisibility(View.GONE);
	}
	manager.sendImageMessage(targetUser, local, new UploadListener() {

		@Override
		public void onStart(BmobMsg msg) {
			// TODO Auto-generated method stub
			ShowLog("开始上传" + msg.getContent() + "状态"
					+ msg.getStatus());
			refreshMessage(msg);
		}

		@Override
		public void onSuccess() {
			// TODO Auto-generated method stub
			mAdapter.notifyDataSetChanged();
		}

		@Override
		public void onFailure(int error, String arg1) {
			// TODO Auto-generated method stub
			ShowLog("上传失败-->arg1:" + arg1);
			mAdapter.notifyDataSetChanged();
		}
	});
}
 
开发者ID:HuTianQi,项目名称:QQ,代码行数:39,代码来源:ChatActivity.java


示例11: sendImageMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * Ĭ�����ϴ�����ͼƬ��֮�����ʾ���� sendImageMessage
 * @Title: sendImageMessage
 * @Description: TODO
 * @param @param localPath
 * @return void
 * @throws
 */
private void sendImageMessage(String local) {
	if (layout_more.getVisibility() == View.VISIBLE) {
		layout_more.setVisibility(View.GONE);
		layout_add.setVisibility(View.GONE);
		layout_emo.setVisibility(View.GONE);
	}
	manager.sendImageMessage(targetUser, local, new UploadListener() {

		@Override
		public void onStart(BmobMsg msg) {
			// TODO Auto-generated method stub
			ShowLog("��ʼ�ϴ�onStart��" + msg.getContent() + ",״̬��"
					+ msg.getStatus());
			refreshMessage(msg);
		}

		@Override
		public void onSuccess() {
			// TODO Auto-generated method stub
			mAdapter.notifyDataSetChanged();
		}

		@Override
		public void onFailure(int error, String arg1) {
			// TODO Auto-generated method stub
			ShowLog("�ϴ�ʧ�� -->arg1��" + arg1);
			mAdapter.notifyDataSetChanged();
		}
	});
}
 
开发者ID:liuyanggithub,项目名称:Hi,代码行数:39,代码来源:ChatActivity.java


示例12: resendFileMsg

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 重发图片消息
 * @Title: resendImageMsg
 * @Description: TODO
 * @param @param parentV
 * @param @param values
 * @return void
 * @throws
 */
private void resendFileMsg(final View parentV, final Object values) {
	BmobChatManager.getInstance(ChatActivity.this).resendFileMessage(targetUser, (BmobMsg) values, new UploadListener() {

		@Override
		public void onStart(BmobMsg msg) {

		}

		@Override
		public void onSuccess() {

			((BmobMsg) values).setStatus(BmobConfig.STATUS_SEND_SUCCESS);
			parentV.findViewById(R.id.progress_load).setVisibility(View.INVISIBLE);
			parentV.findViewById(R.id.iv_fail_resend).setVisibility(View.INVISIBLE);
			if (((BmobMsg) values).getMsgType() == BmobConfig.TYPE_VOICE) {
				parentV.findViewById(R.id.tv_send_status).setVisibility(View.GONE);
				parentV.findViewById(R.id.tv_voice_length).setVisibility(View.VISIBLE);
			} else {
				parentV.findViewById(R.id.tv_send_status).setVisibility(View.VISIBLE);
				((TextView) parentV.findViewById(R.id.tv_send_status)).setText("已发送");
			}
		}

		@Override
		public void onFailure(int arg0, String arg1) {

			((BmobMsg) values).setStatus(BmobConfig.STATUS_SEND_FAIL);
			parentV.findViewById(R.id.progress_load).setVisibility(View.INVISIBLE);
			parentV.findViewById(R.id.iv_fail_resend).setVisibility(View.VISIBLE);
			parentV.findViewById(R.id.tv_send_status).setVisibility(View.INVISIBLE);
		}
	});
	mAdapter.notifyDataSetChanged();
}
 
开发者ID:hanks-zyh,项目名称:Conquer,代码行数:44,代码来源:ChatActivity.java


示例13: sendImageMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 默认先上传本地图片,之后才显示出来 sendImageMessage
 * @Title: sendImageMessage
 * @Description: TODO
 * @param @param localPath
 * @return void
 * @throws
 */
private void sendImageMessage(String local) {
	if (layout_more.getVisibility() == View.VISIBLE) {
		layout_more.setVisibility(View.GONE);
		layout_add.setVisibility(View.GONE);
		layout_emo.setVisibility(View.GONE);
	}
	manager.sendImageMessage(targetUser, local, new UploadListener() {

		@Override
		public void onStart(BmobMsg msg) {
			L.i("开始上传onStart:" + msg.getContent() + ",状态:" + msg.getStatus());
			refreshMessage(msg);
		}

		@Override
		public void onSuccess() {
			mAdapter.notifyDataSetChanged();
		}

		@Override
		public void onFailure(int error, String arg1) {
			L.i("上传失败 -->arg1:" + arg1);
			mAdapter.notifyDataSetChanged();
		}
	});
}
 
开发者ID:hanks-zyh,项目名称:Conquer,代码行数:35,代码来源:ChatActivity.java


示例14: sendImageMessage

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 默认先上传本地图片,之后才显示出来 sendImageMessage
 *
 * @param @param localPath
 * @return void
 * @throws
 * @Title: sendImageMessage
 * @Description: TODO
 */
private void sendImageMessage(String local) {
    if (layout_more.getVisibility() == View.VISIBLE) {
        layout_more.setVisibility(View.GONE);
        layout_add.setVisibility(View.GONE);
        layout_emo.setVisibility(View.GONE);
    }
    mChatManager.sendImageMessage(targetUser, local, new UploadListener() {

        @Override
        public void onStart(BmobMsg msg) {

            LogE("开始上传onStart:" + msg.getContent() + ",状态:"
                    + msg.getStatus());
            refreshMessage(msg);
        }

        @Override
        public void onSuccess() {

            mAdapter.notifyDataSetChanged();
        }

        @Override
        public void onFailure(int error, String arg1) {

            LogE("上传失败 -->arg1:" + arg1);
            mAdapter.notifyDataSetChanged();
        }
    });
}
 
开发者ID:klob,项目名称:Diandi1.20,代码行数:40,代码来源:ChatActivity.java


示例15: resendFileMsg

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * �ط�ͼƬ��Ϣ
 * @param parentView
 * @param values
 */
protected void resendFileMsg(final View parentView, final Object values) {

	BmobChatManager.getInstance(ChatActivity.this).resendFileMessage(
			targetUser, (BmobMsg) values, new UploadListener() {

				@Override
				public void onStart(BmobMsg msg) {
				}

				@Override
				public void onSuccess() {
					((BmobMsg) values)
							.setStatus(BmobConfig.STATUS_SEND_SUCCESS);
					parentView.findViewById(R.id.progress_load).setVisibility(
							View.INVISIBLE);
					parentView.findViewById(R.id.iv_fail_resend)
							.setVisibility(View.INVISIBLE);
					if (((BmobMsg) values).getMsgType() == BmobConfig.TYPE_VOICE) {
						parentView.findViewById(R.id.tv_send_status)
								.setVisibility(View.GONE);
						parentView.findViewById(R.id.tv_voice_length)
								.setVisibility(View.VISIBLE);
					} else {
						parentView.findViewById(R.id.tv_send_status)
								.setVisibility(View.VISIBLE);
						((TextView) parentView
								.findViewById(R.id.tv_send_status))
								.setText("�ѷ���");
					}
				}

				@Override
				public void onFailure(int arg0, String arg1) {
					((BmobMsg) values)
							.setStatus(BmobConfig.STATUS_SEND_FAIL);
					parentView.findViewById(R.id.progress_load).setVisibility(
							View.INVISIBLE);
					parentView.findViewById(R.id.iv_fail_resend)
							.setVisibility(View.VISIBLE);
					parentView.findViewById(R.id.tv_send_status)
							.setVisibility(View.INVISIBLE);
				}
			});
	mAdapter.notifyDataSetChanged();

}
 
开发者ID:JasonGaoH,项目名称:enjoychat,代码行数:52,代码来源:ChatActivity.java


示例16: resendFileMsg

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 重发图片消息
 * 
 * @Title: resendImageMsg
 * @Description: TODO
 * @param @param parentV
 * @param @param values
 * @return void
 * @throws
 */
private void resendFileMsg(final View parentV, final Object values) {
	BmobChatManager.getInstance(ChatActivity.this).resendFileMessage(
			targetUser, (BmobMsg) values, new UploadListener() {

				@Override
				public void onStart(BmobMsg msg) {
					// TODO Auto-generated method stub
				}

				@Override
				public void onSuccess() {
					// TODO Auto-generated method stub
					((BmobMsg) values)
							.setStatus(BmobConfig.STATUS_SEND_SUCCESS);
					parentV.findViewById(R.id.progress_load).setVisibility(
							View.INVISIBLE);
					parentV.findViewById(R.id.iv_fail_resend)
							.setVisibility(View.INVISIBLE);
					if (((BmobMsg) values).getMsgType() == BmobConfig.TYPE_VOICE) {
						parentV.findViewById(R.id.tv_send_status)
								.setVisibility(View.GONE);
						parentV.findViewById(R.id.tv_voice_length)
								.setVisibility(View.VISIBLE);
					} else {
						parentV.findViewById(R.id.tv_send_status)
								.setVisibility(View.VISIBLE);
						((TextView) parentV
								.findViewById(R.id.tv_send_status))
								.setText("已发送");
					}
				}

				@Override
				public void onFailure(int arg0, String arg1) {
					// TODO Auto-generated method stub
					((BmobMsg) values)
							.setStatus(BmobConfig.STATUS_SEND_FAIL);
					parentV.findViewById(R.id.progress_load).setVisibility(
							View.INVISIBLE);
					parentV.findViewById(R.id.iv_fail_resend)
							.setVisibility(View.VISIBLE);
					parentV.findViewById(R.id.tv_send_status)
							.setVisibility(View.INVISIBLE);
				}
			});
	mAdapter.notifyDataSetChanged();
}
 
开发者ID:nEdAy,项目名称:XPPLE_IM,代码行数:58,代码来源:ChatActivity.java


示例17: resendFileMsg

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 
 * @Title: resendImageMsg
 * @Description: TODO
 * @param @param parentV
 * @param @param values
 * @return void
 * @throws
 */
private void resendFileMsg(final View parentV, final Object values) {
	BmobChatManager.getInstance(ChatActivity.this).resendFileMessage(
			targetUser, (BmobMsg) values, new UploadListener() {

				@Override
				public void onStart(BmobMsg msg) {
					// TODO Auto-generated method stub
				}

				@Override
				public void onSuccess() {
					// TODO Auto-generated method stub
					((BmobMsg) values)
							.setStatus(BmobConfig.STATUS_SEND_SUCCESS);
					parentV.findViewById(R.id.progress_load).setVisibility(
							View.INVISIBLE);
					parentV.findViewById(R.id.iv_fail_resend)
							.setVisibility(View.INVISIBLE);
					if (((BmobMsg) values).getMsgType() == BmobConfig.TYPE_VOICE) {
						parentV.findViewById(R.id.tv_send_status)
								.setVisibility(View.GONE);
						parentV.findViewById(R.id.tv_voice_length)
								.setVisibility(View.VISIBLE);
					} else {
						parentV.findViewById(R.id.tv_send_status)
								.setVisibility(View.VISIBLE);
						((TextView) parentV
								.findViewById(R.id.tv_send_status))
								.setText("已发送");
					}
				}

				@Override
				public void onFailure(int arg0, String arg1) {
					// TODO Auto-generated method stub
					((BmobMsg) values)
							.setStatus(BmobConfig.STATUS_SEND_FAIL);
					parentV.findViewById(R.id.progress_load).setVisibility(
							View.INVISIBLE);
					parentV.findViewById(R.id.iv_fail_resend)
							.setVisibility(View.VISIBLE);
					parentV.findViewById(R.id.tv_send_status)
							.setVisibility(View.INVISIBLE);
				}
			});
	mAdapter.notifyDataSetChanged();
}
 
开发者ID:HuTianQi,项目名称:QQ,代码行数:57,代码来源:ChatActivity.java


示例18: resendFileMsg

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * �ط�ͼƬ��Ϣ
 * @Title: resendImageMsg
 * @Description: TODO
 * @param @param parentV
 * @param @param values
 * @return void
 * @throws
 */
private void resendFileMsg(final View parentV, final Object values) {
	BmobChatManager.getInstance(ChatActivity.this).resendFileMessage(
			targetUser, (BmobMsg) values, new UploadListener() {

				@Override
				public void onStart(BmobMsg msg) {
					// TODO Auto-generated method stub
				}

				@Override
				public void onSuccess() {
					// TODO Auto-generated method stub
					((BmobMsg) values)
							.setStatus(BmobConfig.STATUS_SEND_SUCCESS);
					parentV.findViewById(R.id.progress_load).setVisibility(
							View.INVISIBLE);
					parentV.findViewById(R.id.iv_fail_resend)
							.setVisibility(View.INVISIBLE);
					if (((BmobMsg) values).getMsgType() == BmobConfig.TYPE_VOICE) {
						parentV.findViewById(R.id.tv_send_status)
								.setVisibility(View.GONE);
						parentV.findViewById(R.id.tv_voice_length)
								.setVisibility(View.VISIBLE);
					} else {
						parentV.findViewById(R.id.tv_send_status)
								.setVisibility(View.VISIBLE);
						((TextView) parentV
								.findViewById(R.id.tv_send_status))
								.setText("�ѷ���");
					}
				}

				@Override
				public void onFailure(int arg0, String arg1) {
					// TODO Auto-generated method stub
					((BmobMsg) values)
							.setStatus(BmobConfig.STATUS_SEND_FAIL);
					parentV.findViewById(R.id.progress_load).setVisibility(
							View.INVISIBLE);
					parentV.findViewById(R.id.iv_fail_resend)
							.setVisibility(View.VISIBLE);
					parentV.findViewById(R.id.tv_send_status)
							.setVisibility(View.INVISIBLE);
				}
			});
	mAdapter.notifyDataSetChanged();
}
 
开发者ID:liuyanggithub,项目名称:Hi,代码行数:57,代码来源:ChatActivity.java


示例19: resendFileMsg

import cn.bmob.im.inteface.UploadListener; //导入依赖的package包/类
/**
 * 重发图片消息
 *
 * @param @param parentV
 * @param @param values
 * @return void
 * @throws
 * @Title: resendImageMsg
 * @Description: TODO
 */
private void resendFileMsg(final View parentV, final Object values) {
    BmobChatManager.getInstance(ChatActivity.this).resendFileMessage(
            targetUser, (BmobMsg) values, new UploadListener() {

                @Override
                public void onStart(BmobMsg msg) {

                }

                @Override
                public void onSuccess() {

                    ((BmobMsg) values)
                            .setStatus(BmobConfig.STATUS_SEND_SUCCESS);
                    parentV.findViewById(R.id.progress_load).setVisibility(
                            View.INVISIBLE);
                    parentV.findViewById(R.id.iv_fail_resend)
                            .setVisibility(View.INVISIBLE);
                    if (((BmobMsg) values).getMsgType() == BmobConfig.TYPE_VOICE) {
                        parentV.findViewById(R.id.tv_send_status)
                                .setVisibility(View.GONE);
                        parentV.findViewById(R.id.tv_voice_length)
                                .setVisibility(View.VISIBLE);
                    } else {
                        parentV.findViewById(R.id.tv_send_status)
                                .setVisibility(View.VISIBLE);
                        ((TextView) parentV
                                .findViewById(R.id.tv_send_status))
                                .setText("已发送");
                    }
                }

                @Override
                public void onFailure(int arg0, String arg1) {

                    ((BmobMsg) values)
                            .setStatus(BmobConfig.STATUS_SEND_FAIL);
                    parentV.findViewById(R.id.progress_load).setVisibility(
                            View.INVISIBLE);
                    parentV.findViewById(R.id.iv_fail_resend)
                            .setVisibility(View.VISIBLE);
                    parentV.findViewById(R.id.tv_send_status)
                            .setVisibility(View.INVISIBLE);
                }
            }
    );
    mAdapter.notifyDataSetChanged();
}
 
开发者ID:klob,项目名称:Diandi1.20,代码行数:59,代码来源:ChatActivity.java



注:本文中的cn.bmob.im.inteface.UploadListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TileEntityCommand类代码示例发布时间:2022-05-22
下一篇:
Java TransportRequestOptions类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap