Passing 2d char array ptr from the java code to the native code

96 views
Skip to first unread message

Abhyudai Shanker

unread,
Jun 24, 2010, 6:08:47 AM6/24/10
to andro...@googlegroups.com
hey guys,

with NDK, we make a function in our native code which is in turn called from the java source code. In my case this native code function is the main and hence I need to pass command line arguments. How do I pass a 2D char array ptr from the java function to my native code, as there are practically no ptrs in java.

Plz guide me.

Abhyudai

alan

unread,
Jun 24, 2010, 8:36:07 AM6/24/10
to android-ndk
Just pass the string array into the native code then use
GetObjectArrayElement and GetStringChars (see
http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/functions.html
for jni help)

On Jun 24, 11:08 am, Abhyudai Shanker <abhyudai.shan...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages