Page 1 of 1

Configuration file - common location

Posted: Mon Jan 19, 2015 9:09 am
by M&M

hi,

I have 2 apps that I have created using Appery io. Both these apps need to access a common/single configuration file (this configuration file has some details like ip address /port etc)

What would be the best place to store / create this configuration file so that both the different apps can access this common configuration file?

And also If I need to have a common folder where both these Apps can create text files - which location / folder would be the best?

Thanks,
M&M


Configuration file - common location

Posted: Mon Jan 19, 2015 1:20 pm
by Illya Stepanov

Hello -

The best approach would be to store file on the server side or in a server code script.


Configuration file - common location

Posted: Mon Jan 19, 2015 1:59 pm
by M&M

but the Apps on the device need that file for performing certain actions - and the device sometimes may be at locations where there is not network connectivity. So I need to store the configuration file on the device in a location that is accessible by both the apps.

Thanks,
M&M


Configuration file - common location

Posted: Mon Jan 19, 2015 2:51 pm
by Illya Stepanov

If it's Android platform then you could work with File() object and save/read all from you phone's memory, but this will not work on iOS, cause all file operations for app are made in the sandbox.

FYI: Appery.io platform gives you a hybrid application in the end, some things can't be done, some restrictions can be removed with help of plugins.


Configuration file - common location

Posted: Mon Jan 19, 2015 3:04 pm
by M&M

hi,

This is purely on Android Platform. As a matter of fact this will be run on OEM devices with Android 4.2+. So I have the utmost freedom to mess around with it. I was thinking of the least problematic location (in terms of file read / write)...

Thanks,
M&M


Configuration file - common location

Posted: Thu Jan 22, 2015 12:25 pm
by Illya Stepanov

Hi -

1) Try to create a test app that will write and read file to/from SD card.
2) Install second test app that reads same file from SD card.