i try from a cordova plugin to return an image taken from the camera. The image is saved and exists, when I return the array of uri with the uri of the image, I retrieve nothing.
If i take from gallery it works, the code in the "onActivityResult" function when i take from gallery
String dataString = intent.getDataString();
if (dataString != null) {
results = new Uri[]{Uri.parse(dataString)};
}
mFilePathCallback.onReceiveValue(results);
mFilePathCallback = null;
Datastring contain a content:// path format.
When i try this code, in the case of photo taken from camera
results = new Uri[]{Uri.fromFile(photoFile)};
mFilePathCallback.onReceiveValue(results);
I have an empty object. I have The same problem if i load the image from Android FileExplorer, the uri returned in this and camera case is in file:// format.
I try to find the solution on stackoverflow.com or Google but nothing. I try to convert the format file to content with File provider. getUriForFile without success.
Someone can help me? Sorry for bad english, if needs some others informations ask me.
Thanks