Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / [SOLVED] save a file (txt, zip) on sd card or on disk on android

Author
Message
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 5th Nov 2023 08:18
Hi
Do you know if there is a way to save a file (created with agk) on android sdcard or on the disk, on android ?

For image, I use PrintImage() which isn't great but it works.
But for text or zip, I don't know how to save , (not in the write folder, but at another place).

Do you know how I can save a txt file in internal or sd card on android ?

thank you
AGK2 tier1 - http://www.dracaena-studio.com

The author of this post has marked a post as an answer.

Go to answer

Aidan
User Banned
Posted: 5th Nov 2023 15:14
Maybe could use raw: at beginning of your path

Raw:c:\windows\etc etc etc

Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 6th Nov 2023 10:17
I have tried but it doesn't work on android unfortunately.
AGK2 tier1 - http://www.dracaena-studio.com
Bogle
2
Years of Service
User Offline
Joined: 30th Apr 2022
Location:
Posted: 8th Nov 2023 02:22 Edited at: 9th Nov 2023 03:46
This post has been marked by the post author as the answer.


This is working for me on an android 12 device. In this case the program is saving to my phone's internal storage. If you used a "raw:" at the beginning of the path, have your slashes pointed in the right direction, and also have given your app write permissions but are still having trouble, then maybe there is a specific write rule you are violating. There are some restrictions listed in the following documentation page: https://developer.android.com/training/data-storage/shared/documents-files
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 10th Nov 2023 08:40
hi

@Bogle :
thank you very very much, it works on android !

Thanks again
AGK2 tier1 - http://www.dracaena-studio.com

Login to post a reply

Server time is: 2024-05-06 15:43:36
Your offset time is: 2024-05-06 15:43:36