Question

The internal storage path for Samsung galaxy S3 with 4.1.2 keeps on changing.

/mnt/sdcard0/ /mnt/sdcard/ /storage/sdcard0/ /storage/sdcard/

I don't have external card inserted in this phone. And randomly i get the above path locations in Astro file manager App and also the logcat.

Actually my android application transfers file from from one mobile to other using Wifi-Direct technology. When I transfer from Samsung galaxy s3 mini to Samsung galaxy s3 it works well. But the reverse is not happening because it says the "file is not available in specific directory" even if the file does exists.

A sample log from logcat: D/fileUri after substring>>>( 7422): /mnt/sdcard/Download/flash_transfer.apk D/sender socket fileName>>>( 7422): flash_transfer.apk E/wifidirectdemo( 7422): /mnt/sdcard/Download/flash_transfer.apk: open failed: ENOENT (No such file or directory)

But sometimes it shows /storage/sdcard0. Not sure how it changes frequently due to which file transfer is getting interrupted.

Which is the right path for internal sd card for android 4.1.2?

Was it helpful?

Solution

The internal storage path for Samsung galaxy S3 with 4.1.2 keeps on changing.

That is external storage, not internal storage, from the standpoint of the Android SDK.

Which is the right path for internal sd card for android 4.1.2?

There is no "internal sd card" on most Android devices.

Assuming that you mean external storage, the root of external storage is found at the path returned by Environment.getExternalStorageDirectory(). If these files are supposed to go where the user expects "downloads" to go, you can find that location on any device using Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);. Never hardcode paths in Android.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top