I’m getting an error on the following line of code:
FileInputStream is = new FileInputStream("/sdcard/DCIM/ROBIN.jpg");
The error is:
java.io.FileNotFoundException: /sdcard/DCIM/ROBIN.jpg (No such file or directory)
But the image is present in the directory
My USB connection is Charge only
Never hardcode paths like
/sdcard. For example,/sdcardis wrong on most Android devices. UseEnvironment.getExternalStorageDirectory()to find the root of external storage.