Skip to content Skip to sidebar Skip to footer

How To Set File Content In Intent.action_create_document

I am new to android. I was searching how to create a text file and save it to the shared storage so that the user can access them. So I came across this link. https://developer.and

Solution 1:

posting this intent would just create the file.

You will have to override protected void onActivityResult(int requestCode, int resultCode, Intent data)

As you are setting startActivityForResult(intent, CREATE_FILE); if create is successful, you should be getting requestCode == CREATE_FILE in this method.

Here you can open the file and write your content to the file

Post a Comment for "How To Set File Content In Intent.action_create_document"