Reputation: 1214
Im a bit confused. Im developing an application which requires C++ audio libraries. To do this i must used the android NDK. Does the NDK support everything the SDK does with the added feature of using native libraries?
So in summary should i be developing the application using the NDK?
Any clarification is greatly appreciated
Upvotes: 0
Views: 110
Reputation: 2113
The NDK is an add-on to the SDK that allows you to build and debug native C/C++ shared libraries for your Android application.
You still need the SDK to package your application into a full Android package (.apk), or to install it to a device, or run it in the emulator.
If you don't use C/C++/Assembly code, you don't need the NDK period, just download the SDK.
If you use C/C++/Assembly, you need to download both the SDK and NDK.
The NDK provides a limited set of native APIs (e.g. for graphics and audio). Other platform APIs, which are Java-based, and provided by the framework, can be called from C/C++ through the JNI.
Upvotes: 1
Reputation: 7890
In general you would use the NDK to give you functionality which you cannot currently get using the (Java) SDK or in otherwords you are adding additional lower-level functionality. Or that you need better performance from say graphics (an example being a game app).
You can use both the NDK and SDK to create a final app and to access your C code you would need to use the Java Native Interface, JNI.
Upvotes: 1