Find out a place on the Sd-card or Android internal memory which methods?

    1 answer 1

    Environment.getExternalStorageDirectory().toString(); - This is for external storage, permission to write from the card is required, and starting with Api21 also Api21 to obtain this permission in the course of work (But on Api14 (4.4.4) it gives the internal memory of the device (which the user sees)
    Environment.getInternalStorageDirectory().toString(); - I did not use it myself, but it exists

    Context.getFilesDir(); - gets the internal location directory in / data / data / and is available only to the application
    Context.getCacheDir(); - gets the internal cache directory, it can be demolished by the system.
    All methods represent the path as a String
    Context take as this (when calling from the Activity ), or pass it to the method of the external class (as Context , to the caller write this ) and use it there.