I'm working on an Android application in Delphi 10.1 Berlin Update 2, which uses the standard TTakePhotoFromCameraAction
. If I set the Target SDK to 24 or higher, this action stops working and shows an error message:
android.os.FileUriExposedException: file.jpg exposed beyond app through ClipData.Item.getUri()
I searched through the Internet and found some info on this:
Delphi Android file open failure with API 26
What is android.os.FileUriExposedException and what you can do about it
But none of them were about the Camera action, and not directly about Delphi.
I am still new to Delphi, I found a FileProvider API library on GitHub, but to be honest, I don't know how to use it.
So my question is, how can I make TTakePhotoFromCameraAction
work correctly with a higher SDK?