0

I want to have a full documentation for android ndk.

or a url that explains how to use android specific strings like jstring and functions that will call android functions from c etc.

James
  • 13,891
  • 26
  • 68
  • 93
  • I didn't get a perfect one, that's why i am asking whether anyone has a good documentation. – James Mar 22 '12 at 03:34

2 Answers2

1

I guess you mean JNI, the means of Java/C interaction. Try http://java.sun.com/docs/books/jni/html/jniTOC.html

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • Thanks Seva. that was a good one. I will accept you answer in 10 minutes. One more question? Can we call an android function from C? – James Mar 22 '12 at 03:27
  • Sure. Read on up JNI, it's all there. – Seva Alekseyev Mar 22 '12 at 03:33
  • Seva : I have another doubt :- where I can find the printf output in ndk? – James Mar 22 '12 at 03:46
  • That's another file, not a part of JNI. #include , then use __android_log_write() and __android_log_print() with arguments. It all goes to LogCat in Eclipse. – Seva Alekseyev Mar 22 '12 at 04:02
  • You can also set property "log.redirect-stdio=true", to redirect stdio/stderr to android logging facility. Read here how: http://stackoverflow.com/questions/5499202/why-is-redirecting-stdout-stderr-on-android-not-working It will require rooted device though. – Mārtiņš Možeiko Mar 22 '12 at 06:52
1

In the folder android-ndk/docs there are documentation that is connected with android-ndk.

Yury
  • 20,618
  • 7
  • 58
  • 86