本文整理汇总了Java中cn.bmob.im.inteface.UploadListener类的典型用法代码示例。如果您正苦于以下问题:Java UploadListener类的具体用法?Java UploadListener怎么用?Java UploadListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UploadListener类属于cn.bmob.im.inteface包,在下文中一共展示了UploadListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
});
}
示例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();
}
});
}
示例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();
}
});
}
示例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();
}
});
}
示例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();
}
});
}
示例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();
}
});
}
示例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();
}
}
);
}
示例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();
}
});
}
示例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();
}
});
}
示例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();
}
});
}
示例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();
}
});
}
示例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();
}
示例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();
}
});
}
示例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();
}
});
}
示例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();
}