we have 2 memories for store files:
- 1- phone memory
- 2- sd card memory
now :
I can access to files and roots in sdcard memory with Environment.getExternalStorageDirectory
... and return : /storage/sdcard0 this is ok.
but :
When i store files and media (music,pic, ...) in phone memory, how can to get path phone memory?
There are different ways of storing and retrieving application data; SharedPreferences, Internal Storage, External Storage. - SharedPreferences basically restricts other apps from accessing the data. - Internal Storage basically stores the data in Phone memory - External Storage basically stores the data in any other memory cards which can be mounted or unmounted.
If I understand your question properly, then you are interested in External Storage - Public files which basically stores the files in External storage and allows any other apps / user to access the file.
For example: File sample = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC);