Actually, that's what I tried first. But there is the same issue, and that's why I tried to add asking permission
This simple version:
Test_for_iOS.aia (9.8 KB)
has the same issue
I've only tested it with Companion so far. And this works. Are you talking about the compiled app (IPA)?
You are right, it is working with companion, but not with the .ipa
And this method? I think that the "//" method is a bit outdated and someone may have forgotten about it in the iOS implementation.
Yew, this is working.
However, this is a workaround for small text....
I need to be able to store data in a file as I have lot of text in different languages that I manage with other tools
Anyway, thanks for this proposal
@Jacques_Dumarest Based in your target I think will be better if you put your text file in your web server. With your App you can access this file with the block WebViewer. This block runs well in iOS (inc. IPA) for a small text file <70 KB (ca 800 text-lines).
Additionaly in the future you will can change your text file without changing your App.
Thank you very much Ferran !
This is definitively a solution working for Android, iOS both companion and compiled App
I have put my test text file on my Google Drive. I "build" the test file url using info provided here: https://www.howtogeek.com/747810/how-to-make-a-direct-download-link-for-google-drive-files/
In my app, I download the file (provide url and send GET) then I display the text: OK! Save the file and read the saved file, and again I get the correct text
Keep attention that for a big text file the answer in iOS is very delayed. I had reported this issue to @ewpatton. For a more than 100 KB the answer time is not good in iOS.
Thanks
I've put this on my todo list for this week.
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
- 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)
I tried your solution, but seems I am doing something wrong .
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