My app creates a table of insulin doses in HTML for a nice screen view, and then optionally to an API (html2pdf.app) to create a PDF file, using the Web Component.
This works beautifully in the Companion, the file is written to the Companion's ASD and can be shared with a Sharing component no problem.
So I don't think the problem is with the API.
When I create an APK, everything works, up to the point the HTML file is sent to the API and it attempts to download it to the app's ASD. I get an error message "Error 908: The permission WRITE_EXTERNAL_STORAGE has been denied. Please enable it in the settings app." This is on both a Pixel running Android 12 beta, and a tablet running Android 11.
I looked in the APK manifest and deleted the WRITE_EXTERNAL_STORAGE, as I've seen suggested. Then the APK, when run, does ask for permission to access media and files, but then I get the same error message.
I also tried to direct the API file to the /storage/emulated/0/Download folder using the File MakeFullPath block and Shared scope, that didn't work.
So I gather this is a storage permissions problem. My question is whether anyone has a suggestion about how to do this with AI2's current version? Or if they thought the new Storage Access Framework extension would work (although I'm not sure I understand how I'd do that)?
But how was it possible to remove WRITE_EXTERNAL_STORAGE in the Manifest? That could only be possible because DefaultFileScope was already set to Legacy in the Designer. Since only then WRITE_EXTERNAL_STORAGE is declared in the Manifest on devices with Android 11+.
So your statement that you removed WRITE permission from the Manifest doesn't seem to be true.
Yes, because with DefaultFileScope = AppWRITE permission is only declared on devices with Android < 11 (API < 29).
But that's exactly how it should be, because WRITE permission is no longer available on devices with Android 11+. So declaring WRITE on devices running Android 11+ should have no effect. In this respect, this is illogical / wrong and of course a bug.
In fact, no permission at all should be requested for this.