Reputation: 404
I'm saving an Image taken by camera to the external storage. Later on I want to upload the image to our servers.
There I try to recreate the file from path but always a FileNotFoundException appears.
File file = new File("file:/storage/emulated/0/Pictures/Instantley/IMG_20160523_170354803382833.jpg");
I already checked:
requested runtime permission
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
05-23 17:04:33.014 1918-1918/com.instantley.messenger W/System.err: at libcore.io.Posix.open(Native Method)
05-23 17:04:33.014 1918-1918/com.instantley.messenger W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
05-23 17:04:33.015 1918-1918/com.instantley.messenger W/System.err: at libcore.io.IoBridge.open(IoBridge.java:438)
Upvotes: 1
Views: 82
Reputation: 56
Try it without the file: prefix:
file = new File("/storage/emulated/0/Pictures/Instantley/IMG_20160523_170354803382833.jpg");
Upvotes: 3