我的代码是:
1.
File file = new File(Environment.getExternalStorageDirectory(),"myFolder");
Log.d("path", file.toString());
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setDataAndType(Uri.fromFile(file), "*/*");
startActivityForResult(intent,0);
Run Code Online (Sandbox Code Playgroud)
2.
@Override
protected void onActivityResult(int requestCode,
int resultCode, Intent FileReturnedIntent) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, FileReturnedIntent);
Run Code Online (Sandbox Code Playgroud)
如何获取文件路径、名称、扩展名?(假设文件为 doc、pdf、csv 格式)
这是代码,我试图实现:
this._customHttp.httpPostService('app/fetchGridDetails',this.req,new
InterfaceName() {
onEvent(str :string) {
console.log(str);
}
});
Run Code Online (Sandbox Code Playgroud)