-3

File sdcard = Environment.getExternalStorageDirectory(); File file = new File(sdcard, "filename.txt");

Jay Kumar
  • 1
  • 1

1 Answers1

0

For API level 29 and above Use the ACTION_CREATE_DOCUMENT intent action to load the system file picker and allow the user to choose a location where to write the contents of a file. This process is similar to the one used in the "save as" dialogs that other operating systems use. For further information please refer to this documentation.

Eyosiyas
  • 1,422
  • 1
  • 9
  • 25