tags:

views:

40

answers:

1

I am trying to produce a java front end, via some sort of Android "view" that will allow me to show the console output from a native C/C++ application binary.

I followed the steps from various google searches and I have a tool chain that produces native binarys that I can then "adb push" onto the android device. I can either use the adb shell or a console application like ConnectBot to native to the pushed path and run the binary like so: ./someApplication.

However as I stated in my opening sentence I would like to wrap this binary with a font end producing an apk that can be loaded onto the phone and when it runs it opens up and directs the stdio output from the native binary to the screen.

+1  A: 

1) Create android Java project.
2) Place the your library in lib/armeabi folder of the project
3) In your java code loads the library and call exposed JNI calls

An example: http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/

alinux
That's for library inclusion, so it wouldn't have a main entry point. Now I could modify the binary such that it's entry point is something other than main, however I couldn't compile it with the current cross compiler I am using I would need to use the NDK way. However I will try it and let you know if that works. Thanks!
MikeBrWade
That CallNative.zp doesn't seem to exist and there isn't full steps as to how to get that project up and running just snippets.I also tried this:http://honeypod.blogspot.com/2007/12/shared-library-hello-world-for-android.htmlBut again it is missing steps.This works of course but it is just the native binary like i have now:http://benno.id.au/blog/2007/11/13/android-native-appsAny more suggestions?
MikeBrWade