Writing “C” Code for Android
The Android SDK is strictly for Java Programmers — however, the Native Development Kit cracks the door to let some “C” inside
Monday, February 8th, 2010
Java Only, please
The supported and prescribed manner of creating Android applications is via the Android SDK and that means writing your applications in Java.
But what if you have a large body of code already written in C and you want to take leverage that investment for your Android efforts? Should you port your code to Java? Porting your code may be the right answer, but before you start refactoring your code into Java, you should have a look at the Android Native Development Kit (NDK).
Introduced around the release of Android version 1.5, the Android NDK permits developers to write code in “C” that is then callable from Android applications written in Java. The plumbing between the environments is known as the Java Native Interface, or JNI.
JNI has been around for years as a means to permit Java developers to access vendor SDKs or other available…
Please log in to view this content.
Read More
- Monitoring Android Events
- Wiring Up Android Buttons
- Launching Android Apps
- Complementary and Collaborative Apps
- Android Phone-Top Programming, Part 2
|