Hi,I have saved a file from Google Drive on my device in the assets folder. Given that this folder cannot be accessed from Android 10 and above, what should be written instead of this path? If we want to save the file in the download folder, it should be a path that is the same on both Android versions less than 10 and higher.
I have no idea what this is all about. What does this have to do with assets? Assets are read-only (at least with the compiled app).
Hello and thank you. I want to save a PDF file from Google Drive to my Android phone (for all Android versions) using the web viewer, so that I can choose the save location, for example in Downloads or in Gallery or Documents. Please show me the blocks. Thank you.
Set the Default File Scope in the project properties to Legacy or Shared and set the path of property ResponseFileName correctly to shared storage, for example
/storage/emulated/0/Download/...
Taifun
Use the webviewextra extension to download files using the webview. This offers options to download files to Download, Documents, or the apps ASD.
The Web component needs/uses a relative path: /Download/...
and it doesn't work on Android 11+, because the Web component incorrectly requires WRITE
permission on Android 11+.
I recently reported on a similar (old) bug with the File component. I've been doing this for many years. When will these easily avoidable permission bugs finally be fixed?
@mah_bagh Until then, you have no choice but to use extensions or, as a workaround, first download the file into the ASD and then move/copy the file into one of the Shared folders via the File component.
Hello and thanks. I have a PDF file in my assets folder and I want to copy it to my downloads folder. What component or extension should I use? Please show me the blocks or .aia file if possible. Android 11 and above. Thanks.
The probability that a bug will be fixed increases if a correct bug report is created and @ewpatton is aware of the problem
Taifun
This thread is about downloading a file from Google Drive and store it in shared storage/Download
Follow the workaround and
Here is the first step
The second step is to use the Copy method from the file component
Taifun
second step ?1602 error
From scope should be App
To Filename sholld be /Download/arabic.pdf
Taifun
Post the aia.
Yes, you placed the arabic.pdf file in the asset folder. Now we need to move (copy) it from the asset folder to the download folder.I don't see the PDF file in the download folder.
Hmm, already done. Look at the Button2 blocks.
It should be there. Reload/refresh...
Companion or APK?
Yes, thank you . It was copied to the download folder. I was looking in the my files>downloads folder, not the my files>internal storage>download folder(excuse me). My phone is Android 8. I need to find Android 11 and above. Does it work there too?
Yes, and on Android 11+ you don't even need to request storage permissions as it is the case on Android 8 (Android < 11).