I am trying to hook into the Huawei AREngine in a native renderer. the library is connected and I have managed to call a function from the API, but I cant get anything that needs the JNIEnv or context or Activity to work without throwing a SIGSEGV.
Am I missing something obvious? the pointers are showing address values which appear to be consistant from run to run. I am passing the addresses as void* which is shown in the Example app.
Thanks for any advice.
in my activity, this code:
protected void onResume()
{
super.onResume();
CloudEngine.onCreate(getApplicationContext(), this);
call into the JNI which calls into this
void HWSensor::Initialise(void* env, void* context, void* activity)
{
HwArEnginesAvaliblity engines = HwArEnginesSelector_checkAllAvailableEngines(env, activity);
LOGI("HelloArApplication-----jds added ---1--- OnResume(): Check_EnginesAvailability, engines=%d",
engines);
}
I should see the available 'engines' but instead this function HwArEnginesSelector_checkAllAvailableEngines causes a fatal error.