protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case FILE_SELECT_CODE:
// Toast.makeText(this, "选择文件:", Toast.LENGTH_LONG).show();
if (resultCode == RESULT_OK) {
// Get the Uri of the selected file
Uri uri = data.getData();
final String path = FileUtils.getPath(this, uri);
new Thread(new Runnable() {
@Override
public void run(){
transFile(position, path);
}
}
).start();
;
}
break;
}
public int transFile(int position,String path){
String id=idList.get(position);
return anychat.TransFile(Integer.parseInt(id), path, 0, 0, 0, null);
}作者: pengyuxulyy 时间: 2015-5-11 08:38