Open isaacbdawson opened 3 years ago
I've seen all those types of paths.... This is the line that returns it:
Also not sure if you ommited some numbers or System.currentTimeMillis()
on your phone returns only "160585" 🤔🤔🤔
That could explain some problems I've had on my app.....
Feel free to play with the returned value but not sure I will be able to accept a PR as changing that is a big change.
Apologies, I edited the original comment, it was late and I must have accidentally cut off the file name of the png.
For clarification.
The issue is not just the path it returns (which appears to be wrong), but where it is actually storing it. As from my limited research it appears even if it did somehow return the correct path, under Android 10 it wouldn't be accessible to the app itself due to scoped storage.
I guess there is a scenario where all you might need the plugin for is saving the canvas to an image somewhere on the device, and that is it... but I would think most use cases of such a plugin involve actually addressing the image in some manner.
yeah, unfortunately, I don't have enough Android knowledge to be able to fix it in a way that it stores correctly and returns a usable path. :cry:
please feel free to send a PR or open a bounty for someone to do it...
I am having an issue with getting the correct path/filename back.
The plugin is returning: file:///external/images/media/12035
however I find the file itself physically on the device here: /storage/emulated/0/Pictures/c2i_1605857769374.png
the project is using cordova android@9 with a target sdk of 29 the device is running Android 10
any help in resolving this would be greatly appreciated!
edit: it seems this might be (at least partially) related to Android 10 scoped storage? my camera plugin stores images like this: file:///storage/emulated/0/Android/data/com.appname.here/cache/1605859328822.jpg and those work fine.