Reputation: 786
I read about AIDE and it's ability to develop and compile Java directly on Android but what about C support? I read that the PC Android NDK adds full C support only if you wrap it in a dll but a newer version would allow apps to be developed directly in C without any wrapper. Is there anything like that for Android as well? I know of c4droid and it's gcc plugin but I assume that is for developing for x86 and not ARM.
Upvotes: 3
Views: 784
Reputation: 43606
you can use NDK with JNI (Java Native Interface) the following example is simple and could help you to understand quickly the NDK and JNI:
Using NDK to Call C code from Android Apps
The following document contains more examples and details concerning the use of NDK and JNI
Your C code will be build as dynamic linux library (.so) and will be loaded when your application start. The use of JNI will allow your JAVA code to use the C functions from the library. The use of such solution (calling C function from JAVA) is very useful especially if you have complicated and long duration algorithms. executing such algoritms in C take much less time comparing to Java.
Upvotes: 0
Reputation: 3365
Well, you could install linux (Ubuntu, in this case) on your phone and put your development environment in there, I guess.
Check https://play.google.com/store/apps/details?id=com.zpwebsites.ubuntuinstall
Upvotes: 0
Reputation: 179
With Android Native Development Kit (NDK) you can implement parts of your application using C. http://developer.android.com/sdk/ndk/index.html. If you write native code, your applications are still packaged into an .apk file and they still run inside of a virtual machine on the device. The fundamental Android application model does not change.
Upvotes: 1