JNI function return string

I want a function to return a string function call created in an extension. I created one using:

lime create extension GetContacts

that worked fine…

Now I made the following changes:

in GetContacts.java:

public static String sampleMethod (int inputValue) {
	return (String)"Hello World";		
}

and in GetContacts.hx:
private static var getcontacts_sample_method_jni = JNI.createStaticMethod (“org.haxe.extension.GetContacts”, “sampleMethod”, “(I)Ljava/lang/String”);

With that change the application hangs… Any hints?

Best regards
Luis

Hi,

I think you just forgot the ‘;’ here : “(I)Ljava/lang/String;”

1 Like

1 MIllon thanks. It worked now!!!

Regards
Luis