2

I want to return array of string from JNI to java(actully in android). How to do it?

1 Answer 1

1

Take a look at createStringArray() in dalvik/dalvikvm/Main.c. In short:

  • get the ID for the String class
  • pass it to NewObjectArray to create an array of String
  • create String objects and stuff them into the array
  • return the array
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.