Android, how to choose save file location?

25,358

Solution 1

All you need is Android Directory Picker

Solution 2

Better to save files with your app namespace:

String extStorage = Environment.getExternalStorageState();
path = extStorage+"/Android/data/com.mydomain.myapp/";

It will be deleted when app gets uninstalled.

Here is actually everything about data storing.
http://developer.android.com/guide/topics/data/data-storage.html

From the above link:

If you're using API Level 7 or lower, use getExternalStorageDirectory(), to open a File representing the root of the external storage. You should then write your data in the following directory:

/Android/data/<package_name>/files/
Share:
25,358
David
Author by

David

Updated on October 19, 2020

Comments

  • David
    David over 3 years

    is there any solution how to choose the saving files location? maybe with the original file browser, to choose the destination?

    thank you!