I use a TTMSWidgetProgress component in my Delphi Android app and need to create a bitmap representation of it.
I considered a method TTMSWidgetProgress.MakeScreenshot suitable for this purpose but after calling it, an error message is shown:
"java.lang.IllegalArgumentException: couldn't find meta-data for provider with authority cz.yamaco.Ems fileprovider " (cz.yamaco.Ems is an identifier of my app)
Helo Pieter, thank you for an useful tip. I'd like to inform you that I found the solution with help of Mr. Salaj from Winsoft Ltd. - maybe it will be purposeful for other programmers:
There are two steps necessary for a proper working on Android API 30 onwards (they were reportedly not necessary on Android API until 29, however in version 30 some security rules were introduced as for shared sheets):
Ad this section into manifest template file:
<provider
android:name="androidx.core.content.Provider"
android:authorities="cz.yamaco.Ems.provider" //in general, applicationID.provider
android:exported="false"
android:grantUriPermissions="true">
Add file file_provider_paths.xml into Deployment with following content:
<?xml version="1.0" encoding="utf-8"?>
and point it into destination location res\xml.
Furthermore, READ_EXTERNAL_DEVICE permission must be implemented by code.