Advertisement
Tech

How to use Android 1.5 NDK: An Introduction to the Android Native Development Kit

Android Native Development Kit can provide benefits in certain applications. Read on to learn how to use this native code for your Android applications.

By anamariarox
Desk Tech
Reading time 2 min read
Word count 375
Google android Mobile Guides
How to use Android 1.5 NDK: An Introduction to the Android Native Development Kit
Advertisement
Quick Take

Android Native Development Kit can provide benefits in certain applications. Read on to learn how to use this native code for your Android applications.

On this page

Use native code!

Many users asked for the possibility to use Android applications in their native language. Now you have the chance to do this. All you need to do is to go to the Android developer site and download the Android Native Development Kit.

Advertisement

Learn about the main advantages of NDK!

NDK provides you with native code libraries from C and C++ sources. These libraries will be transformed into packages files. You will also be able to access the Android 1.5 documentation, samples and tutorials.

Advertisement

Get stable headers!

Android 1.5 provides stable headers for some applications like the standard C library, the standard math library, the JNI interface.

Advertisement

Learn to balance the benefits against the disadvantages!

As a developer you will need to learn how to balance the benefits of using NDK against the disadvantages. First of all keep in mind that NDK can’t be applied to all of the available Android applications.

Advertisement

Another thing a developer should be aware of is that by using NDK the application will become more complicated and harder to debug. You will have no access to framework APIs. To increase performance you can use for some applications CPU-intensive operations.

Make sure you read the documentation!

Advertisement

Read the documentation and you will find a lot of useful information about how to create shared libraries for your Android application. Remember that you can find the documentation only in the downloadable NDK package.

You will also learn about issues in the Android system images that you should keep in mind if you are developing using the NDK.

Advertisement

In the documentation you can read information about NDK development. Take your time to learn about NDK and you will be able to take advantage of all the benefits that you can get!

To access the overview of the ‘’bionic’’ C library all you have to do is to read the OVERVIEW.TXT.

Advertisement

Check the two sample Android applications!

To understand better how to use native code in your Android applications you should check these two sample Android.

Advertisement

The application hello-JNI allows you to load a string from a native method to display it in the application.

You will also be able to load a shared library in a native method with the application two-LIBS.

Advertisement
Keep Exploring

More from Tech

Filed under
Google android Mobile
More topics
Guides
Advertisement