|
| windev mobile 18 / android / ini file |
| Iniciado por guest, 02,ago. 2015 10:41 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 02,agosto 2015 - 10:41 |
Hi all
I cannot get iniwrite to work on an anroid device. Can somebody please post a piece of code that works for him/her?
Thanks Noel |
| |
| |
| | | |
|
| | |
| |
| Publicado el 02,agosto 2015 - 10:57 |
Hi Noel
From the help: Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its sub-directories, as well as onto the external memory (SDCard).
To find a usable dir in android, use the fCurrentDir function: This directory corresponds to the "files" directory of the application. You can read and write in this directory.
Best regards Viggo Poulsen |
| |
| |
| | | |
|
| | |
| |
| Publicado el 02,agosto 2015 - 12:07 |
Thanks Viggo
will try it out.
regards Noel |
| |
| |
| | | |
|
| | |
| |
| Publicado el 16,agosto 2015 - 14:27 |
Hi Noel.
try this
//Initialization
gsCurrentDir is string=CompleteDir(fCurrentDir()) sPath is string=""
IF InAndroidSimulatorMode() THEN
IF SysStatusStorageCard() = sysCardAvailable THEN sPath= SysDirStorageCard() + ["/"] + "Data" + ["/"] +"config.ini" ELSE sPath=gsCurrentDir+["/"] +"config.ini" END
ELSE sPath="c:\tmp\config.ini" END
//To read sUser is string =INIRead("Data","User", "",sPath) sPass is string =INIRead("Data","Pass", "",sPath)
//To write INIWrite("Data","User","jhon",sPath) INIWrite("Datos","Pass","1234",sPath) |
| |
| |
| | | |
|
| | |
| |
| Publicado el 16,agosto 2015 - 14:28 |
Hi Noel.
try this
gsCurrentDir is string=CompleteDir(fCurrentDir()) sPath is string=""
IF InAndroidSimulatorMode() THEN
IF SysStatusStorageCard() = sysCardAvailable THEN sPath= SysDirStorageCard() + ["/"] + "Data" + ["/"] +"config.ini" ELSE sPath=gsCurrentDir+["/"] +"config.ini" END
ELSE sPath="c:\tmp\config.ini" END
//To read sUser is string =INIRead("Data","User", "",sPath) sPass is string =INIRead("Data","Pass", "",sPath)
//To write INIWrite("Data","User","jhon",sPath) INIWrite("Datos","Pass","1234",sPath) |
| |
| |
| | | |
|
| | | | |
| | |
|