Always use
Enviroment.getExternalStorageDirectory().getPath()
instead of hard coding as below...
/mnt/sdcard/
If you choose hard coding way then the system will throw you below message...
Do not hardcode "/sdcard/"; use Environment.getExternalStorageDirectory().getPath() instead
Another problem is that SDCard
folder name isn't same for all devices...SDCard
name different in Some devices.
In samsung devices, it is named external_sd
and in this case, the hard coding way will be failed. That's why following way is the best...
File file = new File(Enviroment.getExternalStorageDirectory().getPath(), "");