Friday, February 15, 2013
Android 'C' Programming
Android SDK
Google provides a standard set of tools that allow programmers to create apps for the Android platform in the form of its Software Development Kit, or SDK. This includes an Android system simulator for testing projects and the packaging tools for creating a file that Android can execute from the project's source code. The SDK also includes libraries for allowing apps written in Java to interact with the advanced features of the Android operating system.
Android NDK
Developers who want to create apps, or app components, in the C programming language can download Google's Native Development Kit, or NDK. This is a collection of libraries similar to the ones contained in the SDK. However they are in the C programming language instead of Java. Developers can use these libraries to develop for Android in C in the same way that the SDK's libraries allow for development in Java.
Using NDK
The NDK is not functional as an independent development kit. Instead, it is an extension of the SDK. Developers have to install the SDK as a platform within which to download, use, and update other development components. These include the NDK. Developers still use the SDK's tools to create the '.apk' packages that Android runs as apps, the SDK's simulator to test the apps and the SDK's tools for transferring the .apk packages onto an actual Android device.
C or Java
The Java language works by compiling source code into an intermediary form called bytecode, which system specific JVMs translate into the machine code the device actually executes. In this process, the JVM will automatically optimize the machine code it produces. This saves the programmer the time of trying to optimize code. However, programmers who work in the C language directly control what the compiled machine code will look like. This allows app developers who want to exert this detailed level of control over their code to do so. In addition, it allows developers who have already written a substantial amount of code for a project in C to quickly port it to Android.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment