On Oct 3, 2012, at 6:12 AM, Adrian@Gravity <[email protected]> wrote:
> Tried the following but getting 'No such method'
> 
> IntPtr ip_PushManager = JNIEnv.FindClass("com/urbanairship/push/PushManager");
> 
>                IntPtr ip_setReciver = JNIEnv.GetMethodID(ip_PushManager, 
> "shared().setIntentReceiver", "(Landroid/app/Class)V");

You have to lookup each method individually; JNIEnv doesn't support looking up 
arbitrary expressions:

        IntPtr ip_PushManager_shared = JNIEnv.GetMethodID(ip_PushManager, 
"shared", "...");
        IntPtr lrefShared = JNIEnv.CallStaticObjectMethod(ip_PushManager, 
ip_PushManager_shared);
        IntPtr ip_PushManager_setIntentReceiver = 
JNIEnv.GetMethodID(ip_PushManager, "setIntentReceiver", 
"(Landroid/app/Class)V");
        JNIEnv.CallVoidMethod(lrefShared, ip_PushManager_setIntentReceiver, new 
JValue(Java.Lang.Class.FromType(typeof(whatever)));
        JNIEnv.DeleteLocalRef(lrefShared);

 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to