问题
More exactly, how to create activity and then how to use selected path to write to removable storage?
Like this, and this?
回答1:
First you need to create Custom Dialog for Hint. then call intent to open specific Folder. see below code.
Uri selectedUri = Uri.parse(Environment.getExternalStorageDirectory() + "/myFolder/");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(selectedUri, "resource/folder");
if (intent.resolveActivityInfo(getPackageManager(), 0) != null)
{
startActivity(intent);
}
else
{
// if you reach this place, it means there is no any file
// explorer app installed on your device
}
For custom Dialog Material Design Dialog Lib
来源:https://stackoverflow.com/questions/40575914/how-to-create-intent-activity-with-file-pick-dialog