I am trying to call NfcAdapter.setNdefPushMessageCallback from JNI layer.
As you must be aware the signature for the same is
setNdefPushMessageCallback(NfcAdapter.CreateNdefMessageCallback callback, Activity activity, Activity... activities)
I have gone through some references to this problem one here and another one
I have taken care of all those suggestions. I suspect it must be related to second one.
Here is my code :
jmethodID methodId = (*env)->GetMethodID(
env, cls, "setNdefPushMessageCallback",
"(Landroid/nfc/NfcAdapter$CreateNdefMessageCallback;Landroid/app/Activity;[Landroid/app/Activity;)V");
(*env)->CallVoidMethod(env, g_adapter, methodId, g_nfcCallback, g_activity);
In the place of [Landroid/app/Activity; (va_list), I am not giving any other argument.
In case of Java this is perfectly accepted :
NfcAdapter.setNdefPushMessageCallback(callback, activity);
Please suggest me the solution