Andriod: Best Practice to load properties/config files?

Hi all, just starting playing around with getting my game up an running on Android…and apparently the first issue I ran into is, is that I can no longer load properties files from the class path :frowning:

Are there any recommended/best practices to load config files on jmonkey/andriod (with having to too much specific native android code?)

I looks like it may possible to directly edit AndriodHarness, and a ‘setter’ on my main class, where I could essentially set the properties file and first loading it form the AndriodHarness initially doing something like:

InputStream stream = getResources().openRawResource(R.raw.myConfigProperties)

Properties p = new Properties();


but that feels a bit award, is there anyway to use the ‘existing’ AssetManager where (logically there would just be ‘config’ asset under Project Assets/config).

Also in a somewhat related manner, AppSettings is essentially a list of NVPs, are these tied to an initial xml/properties file definition for Android? I see on windows it uses the registery…

you can create your own loader for any type of file and then load them with the assetmanager.

Then you have to register your loader with the asset manager.

for example look at the ogre MeshLoader

it loads ogre’s mesh.xml files.