请看下面的代码,因为你可以看到我的 FilePath 只获得这个路径 /document/1393,那么我如何获得像/sdcard/document/test.docx这样的绝对路径?
// Get Result Back
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch(requestCode){
case FILE_SELECT_CODE:
if(resultCode==-1){
String FilePath = data.getData().getPath();
Log.d("onActivityResult", "FilePath = " + FilePath);
cityEditText.setText(FilePath);
}
break;
}
}