M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Configuration file - common location

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Configuration file - common location

Hello -

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

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Configuration file - common location

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Configuration file - common location

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.

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Configuration file - common location

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Configuration file - common location

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.

Return to “Issues”