I'm trying to make a call from c# to a Java library and can't figure out the
bits of JNIENV syntax, I'm able to get so far and was wondering if anyone
could help me. I have put the Java Code and the C# code that I've got so
far. I've just listed some of the main members in the Java PushManager class
which I'm trying make the call in. I'm able to make calls to enablePush and
disablePush ok. Able to get results back for the FindClass and the "shared"
GetMethodID but not sure where to go after this.

/Java Code
------------------------------------
// This is the Java call I'm trying to make in C#
String apid = PushManager.shared().getAPID();

//  This is the PushManager Class
package com.urbanairship.push;

public class PushManager  {
  public static void init() { /* compiled code */ }
    
    public static com.urbanairship.push.PushManager shared() { /* compiled
code */ }

    public static void enablePush() { /* compiled code */ }
    
    public static void disablePush() { /* compiled code */ }

    private PushManager() { /* compiled code */ }

   public java.lang.String getAPID() { /* compiled code */ }
}
/

/C# Code So Far
------------------------------------
IntPtr ipPushmanager =
JNIEnv.FindClass("com/urbanairship/push/PushManager");
IntPtr ipShared = JNIEnv.GetStaticMethodID(ipPushmanager , "shared",
"()Lcom/urbanairship/push/PushManager;");

IntPtr ipApid = JNIEnv.GetMethodID(?????, "getAPID",
"()Ljava.lang.String;");
/

Thanks

Gavin

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/JNIENV-Call-Syntax-tp5578767p5578767.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

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

Reply via email to