The src folder does not exist on your device, and you do not have access to the "application folder" (where your own binary files are stored), otherwise you can change your application on the device, potentially installing a virus.
The variable i in your example is the temporary URL of the file that you can see on your PC / Mac. You must copy it to a local file or local storage.
You can open the input stream for an image using FileSystemStorage , you can save it using the same class (for example, in the application’s home directory), or you can use the Storage class to save the image somewhere.
eg. you can copy the image to local storage as such:
InputStream stream = FileSystemStorage.getInstance().openInputStream(i); OutputStream out = Storage.getInstance().createOutputStream("MyImage"); Util.copy(stream, out); Util.cleanup(stream); Util.cleanup(out);
source share