you are asking in the Kodular community but you are using App Inventor… the environments are too different to expect the same result…
Your are asking in the wrong community and therefore it is a waste of time for everyone here trying to help you
This is such a helpful extension, but may I ask a question, please?
How do I arrange my blocks for this “Fetch” extension to be able to download a .mp4 file from OneDrive through WebView?
I am not much familiar with this permission. Even I haven’t added this permission in extension manifest. AFAIK you don’t require any permission in android 11 until you download your file to ASD and scoped shared storage like Downloads, Documents etc. However, you could ask the WRITE_EXTERNAL_STORAGE permission own in lower version devices where it is required (Maybe API < 29). I don’t know exactly. You could look here for more info about storage and permissions.
Storage Permissions on Android 10 & 11 - EDIT (May 11, 2022)
Since Kodular & AI2 decided to declare requestLegacyExternalStorage=true in the Manifest (which is only ignored on Android 11+), storage permissions must also be requested on Android 10.
If you remove this from the Manifest, which I would recommend, no permission for the Shared folders would be required on Android 10 either. The storage permissions would then have to be declared as follows:
You should request the MANAGE_EXTERNAL_STORAGE permission only when your app cannot effectively make use of the more privacy-friendly APIs, such as Storage Access Framework or the Media Store API. Additionally, the app’s usage of the permission must fall within permitted uses, and must be directly tied to the core functionality of the app. If your app includes a use case that’s similar to the following examples, it’s likely to be allowed to request the MANAGE_EXTERNAL_STORAGE permission:
just try it and it work perfectly with my phone android 12.
the get file size work with both ASD checked or privatedir checked.
i look at your blocks, and the file size part is packed, what i do now is get file size by id > get global id , as how the tutorial told in the first post and it is not working in my app.
Anyway i save the file in ASD directory, i use your installAPK extension to point the path with the AppSpecificDirectory block.
This event raises when download progress changed. This is a replacement for old OnProgress because of new parameters. If I added these new params in old block then many projects would be corrupted on updating the extension.
This block ask the write permission from user. You can use this blocks according to your needs.
Returns true if the write permission is granted.
This property, if set to true then the bytes returned in Progress Changed event will automatically converted to suitable units. This will help you to reduce some blocks.
Deprecated
Some blocks has been deprecated and would not work anymore and will be removed in future updates. Make sure to migrated to new blocks.
This event is deprecated since new event is added as replacement. This block won’t work anymore and will be removed in future updates. Make sure to migrated to the new Progress Changed block.