I am declaring a JObject NewObjectV.
jobject NewObjectV (JNIEnv *env, jclass cls, jmethodID methodId, WIMAX_API_DEVICE_ID_P pDeviceId);
But am getting the following error
undefined reference to ' android :: NewObjectV(_JNIEnv *, _jclass *, _jmethodID *, _WIMAX_API_DEVICE_ID_P *).
What should be the code to remove this error?
My complete code is
void fun_IndDeviceStatusUpdate(WIMAX_API_DEVICE_ID_P pDeviceId, WIMAX_API_DEVICE_STATUS deviceStatus, WIMAX_API_STATUS_REASON statusReason, WIMAX_API_CONNECTION_PROGRESS_INFO connectionProgressInfo) {
JNIEnv *env = NULL;
int nResult = -1;
// LOGD(" AttachCurrentThread() ->D1");
nResult = g_jVM->AttachCurrentThread(&env, NULL);
// LOGD(" AttachCurrentThread() ->D2-%d",nResult);
if ((nResult != 0) || (env == NULL))
{
LOGD(" AttachCurrentThread() failed");
}
else
{
// LOGD(" AttachCurrentThread() ->D3");
if(deviceStatusChangeCB == NULL)
{
LOGD(" deviceStatusChangeCB is NULL ");
}
else
{
LOGD(" deviceStatusChangeCB is not NULL ");
}
jclass cls = env->GetObjectClass(deviceStatusChangeCB);
// LOGD(" AttachCurrentThread() ->D4"); jmethodID methodId = env->GetMethodID(cls, "callback", "(Landroid/net/wimax/structs/DeviceId;III)V"); jobject NewObjectV (JNIEnv *env, jclass cls, jmethodID methodId, WIMAX_API_DEVICE_ID_P pDeviceId);
// LOGD(" AttachCurrentThread() failed->D5"); if (methodId) { LOGD(" STARTING CALL VOI D ");
env->CallVoidMethod(deviceStatusChangeCB, methodId, NewObjectV, deviceStatus, statusReason, connectionProgressInfo);
}
if (g_jVM->DetachCurrentThread() != JNI_OK) {
LOGE("%s: DetachCurrentThread() failed", __FUNCTION__);
}
}
// LOGD("JNI->CALLBACK->D3");
}