How is it possible to read asset file with iOS?

:+1:

This works fine. However, If I download an audio file (.mp3), I get the file, but in order to play it, the file has to be the same name as the file on Google drive.
Is there a way to get the file name from the google ID?

And that should be the case (with Companion and the IPA).
Show your blocks and (a screenshot of) the audio path.

Thanks for your feedback.
I am downloading files from my Google drive using its FileID as described here: https://www.howtogeek.com/747810/how-to-make-a-direct-download-link-for-google-drive-files/.

If this file is a text file, I can save the file with any name, and it works with Companion, apk, ipa.

For media file (audio), result is different. If I try to download it, save it and play it I get the following results:

1- Download and save file with the same name as file in Google drive: /Cloche_Eglise.mp3

  • Companion Android: Playing audio file works Fine :smiley:
  • Android apk: Play fails, and I get the message: Error 701: Unable to load /Audio.mp3
  • Companion iOS: Download fails: Error 1102: The encoding utf8 is not supported .
  • iOS ipa: Download fails: Error 1102: The encoding utf8 is not supported .

2- Download and save file with a different name: /Audio.mp3

  • Companion Android: Play fails, and I get the message: Error 701: Unable to load /Audio.mp3
  • Android apk: Play fails, and I get the message: Error 701: Unable to load /Audio.mp3
  • Companion iOS: Download fails: Error 1102: The encoding utf8 is not supported .
  • iOS ipa: Download fails: Error 1102: The encoding utf8 is not supported .

Here is a screenshot of my App:


The full test program (testing texte, audio & image) is here:
Download_File_From_Google_Drive.aia (14.4 KB)

There is no problem at all, neither with Companion nor with the IPA.

I tried your solution, but seems I am doing something wrong :frowning:.
As you retrieve the file in Web1.GotFile, I assume you set SaveResonse to True (In the designer?) otherwise, GotText is called.
With SaveResponse True, I have the message: Error 1101: Unable to get a response with the specified URL: https://drive.google.com/uc?export=download&id=1........
Here is the screenshot of my project:


and the project file: Download_File_From_Google_Drive_V2.aia (11.1 KB)
Thank you very much for your help

Actually, what I describe above is for Android.
It is working for iOS

I set it in the Designer and there is no issue (error message). As I said, it works with Companion & the IPA.

Yes.

YES, your solution is working for iOS: both Companion et ipa.
The issue is with Android, companion and apk !
I suppose I should move this issue out of this category as it it not anymore an iOS issue.

Just a note that I've fixed the use of // in compiled IPAs locally. It will be in the next build server update.

1 Like

No. Since you have set DefaultFileScope = Legacy, the path (.ResponseFileName) on Android 11+ must be set to one of the Shared folders (/Download, /Music etc).

Thanks