Reputation: 54021
On normal JVMs you can use META-INF/MANIFEST.MF
to declare application properties, in J2ME
you can use the .jad
-Files but what can you do on Android?
I need a way to declare properties which I can access using System.getProperties()
on Android. It would be best if I could use the same file format as MANIFEST.MF
-like property files use.
Upvotes: 4
Views: 1161
Reputation: 11313
I usually put them in (for example) "res/values/props.xml" Your build scripts can get at them, and then you just need to call: activityName.getString(R.props.propertyName); to pull out the value as a string.
Upvotes: 1