I am able to write the text files by opening the Files app using the intent. But when I open the Files app through intent it is opening Downloads path instead I would like to open a specific path. Is that possible ?
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TITLE, fileName);
startActivityForResult(intent, CREATE_REQUEST_CODE);
I would like to launch the Files app using Intent and it should open specific path. I have tried intent.setDataAndType by passing the Uri, but it is not working.
in order to indicate the initial location of documents navigator you should add this to your intent :
like this :