Hi all,
1. I have a c lib which will send & receive multicast package, if I
lauch it in native ap, everything is OK, but if lauched through jni ,so it
run in
dalvik env, it can not receive multicast, i think is may be disabled by
dalvik, is there any permission can enable this feature?
2. In this lib i will make some callback of function in dalvik class.
according to tranditional method which can run under JDK1.5 & 1.6
as follow: (I make it under source code env not NDK)
In some initialization method save jvm pointer
*int nRt = env->GetJavaVM(&jvm);*
some callback func in lib:
* **nResult = jvm->AttachCurrentThread((void **)&env, NULL);*
*
*
* **if ((nResult != 0) || (env == NULL))*
* **{*
* ** return;*
* **}*
*
*
* **jstring res = env->NewStringUTF(srvName); // failed*
*jclass cls = env->FindClass("com/xxx/ooo/ServerList");*
* ...*
*
*
*jvm->DetachCurrentThread();*
it seems AttachCurrentThread not failed but env not correct.
Regards,
Caval.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---