[Solved] Android WriteFile Not Writing

BlitzMax Forums/Brucey's Modules/[Solved] Android WriteFile Not Writing

RustyKristi(Posted 2016) [#1]
I just tried saving with Android
Import Sdl.sdl
Import BRL.System
Import BRL.Retro

...

savepath = GetPrefPath("rusty","myapp") 

Local file:TStream = WriteFile(savepath +  "savegame.txt")
If Not file Notify "failed to open file" 
WriteLine file,"hello world"
CloseStream file


debugging savepath does show "/data/data/com.blitzmax.android/files/"

but I can't see any savegame.txt in that location

PS: On Windows, it successfully saved somewhere in AppData/Roaming/myfolder/filename.txt


RustyKristi(Posted 2016) [#2]
Edit: GetAndroidExternalStoragePath solved it