Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuration file in Android. Does that exist?

I have some configuration I want to save it in my Android application and read it whenever I need , for instance, the server URL that it should try to access like that.

Is there any similar mechanism like web.config in ASP.NET available in Android?

A central configuration file that can be set up manually and then read by the application? Any help would be appreciated!

like image 360
JSBach Avatar asked Jun 10 '11 19:06

JSBach


People also ask

What is Android configuration?

The Android Device Configuration Service collects information from Android devices, including: Device and account identifiers. Device attributes. Software and security software versions. Network connectivity and performance data.

Where is the configuration file?

Configuration files are normally saved in the Settings folder inside the My Documents\Source Insight folder.

Where is configuration data stored?

Configuration data is stored in operating system environment variables.


1 Answers

We use a .properties file in assets folder. It works out very well for us as we support multiple carriers with this, write to it (in case some values, sent from server, need to change. This is done at app start time, thus making our code configurable from server).

like image 84
omermuhammed Avatar answered Oct 24 '22 17:10

omermuhammed