I have a native shared library compiled using android-ndk
one of the C API functions is:
int load_config(const char *fn, Config *cfg)
I have wrapped the function with JNI and successfuly called it from Java, e.g.
Config cfg = new Config();
my_shared_lib.load_config("test.gcf", cfg);
System.out.println("cfg.rx_id = " + cfg.getRx_id());
This prints the expected value from the Config data structure
But now that I have ported it on to an Android emulator I am confused as how to handle the string representing the filename of the configuration data
I have tried adding test.gcf to the $(PROJECT)/assets dir then:
Config cfg = new Config();
my_shared_lib.load_config("assets/test.gcf", cfg);
outputText.append("cfg.rx_id = " + cfg.getRx_id());
but this doesn't work, i.e. the expected value from the Config data structure isn't ouput (I just get a blank)
In other words, what do you do when your native library function expects a filename as a parameter?