Jump to ratings and reviews
Rate this book

Android Native Development Kit Cookbook

Rate this book
Create Android apps using Native C/C++ with the expert guidance contained in this cookbook. From basic routines to advanced multimedia development, it helps you harness the full power of Android NDK. Overview In Detail Building Android applications would usually mean that you spend all of your time working in Java. There are however times when this is not the most efficient or best method for the application being built. This is where Android NDK comes in. Android NDK allows the developer to write in Native C/C++, giving you the power to reuse code and libraries and also, in most cases, increase the speed and efficiency of your application. The "Android Native Development Kit Cookbook" will help you understand the development, building, and debugging of your native Android applications. We will discover and learn JNI programming and essential NDK APIs such as OpenGL ES, and the native application API. We will then explore the process of porting existing libraries and software to NDK. By the end of this book you will be able to build your own apps in NDK apps. "Android Native Development Kit Cookbook" begins with basic recipes that will help you in the building and debugging of native apps, and JNI programming. The recipes cover various topics of application development with Android NDK such as OpenGL programming and Multimedia programming. We will begin with a simple recipe, Hello NDK, before moving on to cover advanced topics with recipes on OpenGL ES that focus on 2D and 3D graphics, as well as recipes that discuss working with NDK and external APIs. If you are looking for ways to make your application available in Android and take measures to boost your application’s performance, then this Cookbook is for you. What you will learn from this book Approach This book is written in a Cookbook style, beginning with recipes which focus on helping developers make their software/application available in Android. Who this book is written for Android developers who want to learn Android NDK programming, or develop multimedia and games in Android NDK will benefit from this book.

346 pages, Paperback

First published January 1, 2013

4 people are currently reading
26 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
6 (37%)
4 stars
6 (37%)
3 stars
4 (25%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 11 of 11 reviews
9 reviews1 follower
May 24, 2013
The book gives a very detailed and exhaustive description of entry-level, intermediate and advanced techniques that could be used with Android NDK. All chapters, that are more or less independent of each other, explore specific arguments of Android JNI and NDK aspects. For the first time I saw in an Android NDK book the description of OpenGL (2D and 3D) and OpenMAX technologies from a native point of view. This allow you to write Android applications with a very limited number of Java code lines!

In addition to that, the author describes a typical not documented approach in several other Android NDK books: the porting of an existing application to Android with NDK. This is a very useful chapter for people that could want to reuse existing libraries and applications written in C/C++ inside an Android one.

I have to say that this book is not for everyone. You need to be a good C/C++ programmer because there are several required knowledges that must be well known by the reader (multithreading, semaphores, mutex, OpenGL, exceptions, OpenMAX, and so on), but, if you are curious about Android NDK and native code for Android, there are surely some chapters (in my opinion only a few) that could be for a large audience.

In summary, I find the book perfect to make you a skilled Android NDK programmer! In addition, the two bonus chapters (available for download from website) are fantastic (I started reading the bonus chapters instead of the book!). If you love C/C++ language and in the same time you want to build applications for your Android device, this book is for you.

Link for the book is:
http://www.packtpub.com/android-nativ...
2 reviews
May 29, 2013
This book is a nice introduction into NDK development on Android. It's written in cookbook style: every example is build like a recipe. It gives a step by step introduction how to build all of them. Every chapter explains the starting steps again and which chapters should be read before trying that specific recipe. One should follow those examples while reading. This is great when programming with the book next to you but also this makes it harder usable too look up something specific. Especially as only method signatures of API methods are shown but nearly no example code is printed. So you need to have the examples open in parallel. If you like this, this is your book. The book also explains detailled steps how to setup the environment on different operating systems, it's written independent of any IDE so it builds on command line only. Don't be afraid if you have not coded Android before. Android specific tasks are explained in depth i.e. taking a screenshot with adb or signing an android app. So the target audience is more the native developer than an android pro. review based on http://www.packtpub.com/android-nativ...
2 reviews2 followers
May 2, 2013
First of all thanks to Feipeng Liu for writing the Android Development Kit Cookbook, I have read other books too before reading this to learn the native development for android. What makes it worth using this book, I found the chapters are pretty well designed not everything but something in each chapter you will find to learn. I tried all the examples provided in the book, though some i have skipped as its not needed for me right now. All examples work the same as it explained in the book and plus point is its explained in very simple language which helps me to understand very well.

I started reading this book a week before and just in short time I learned a lot which I was trying to learned from various INTERNET source but never succeed as some have good content but no good demo example to run with. This book provide every bit of source for a beginner to learn with. Yeah but make sure at-least you know how to setup the environment and basic of android as that will help to make it learn faster.
2 reviews1 follower
May 29, 2013
This books is a good starter for NDK development for Android developers. It follows cook book style which gives a beginner a good kick start. Recipes are easy to follow even if you are not a pro C/C++ developer. But you must know basic C/C++ as a prerequisite to read/understand instructions. Instructions are available for almost all development environments-windows, linux and mac OS. Instructions are difficult to follow if reading in in Kindle version and little cumbersome to navigate.
Few starting chapters have are for beginner audience, but later chapters are for advanced developers. Chapter on debugging NDK has debugging instructions for pretty much all kinds of tools/IDEs including Eclipse. I really liked the "How it works..." section of the recipes. This is a good book to understand the OpenGL even if you don't have its prior understanding. Overall its a good book if you want to learn or deepen your understanding of Native development.

This review is based on http://www.packtpub.com/android-nativ...
1 review
May 26, 2013
When I saw preview copies of this book being offered, I jumped at the chance! As an experienced Android SDK developer with a background as a professional C/C++ developer, this is a topic I want to learn more about. I've only just opened the book, so these are my initial thoughts and I will post an update when I complete the book.

The book starts with an introduction to the NDK and walks the user through setting up the environment. Even though I've already worked with the NDK, I found good information in the first chapter. Remember, the NDK isn't for everything and the author explains the pros and cons of NDK development. There are not many chapters in the book, as this gives the author plenty of opportunity to go in depth on the topics. If the first chapter is representative of the rest of the book, this is going to be time well spent.

Android Native Development Kit Cookbook
http://www.packtpub.com/android-nativ...
1 review1 follower
May 30, 2013
Android Native Development Kit(NDK)cookbook is a good starter for beginners and newbies android developers who want a simplified but precise and straight to the point introduction to use of C/C++ written code in android using the NDK. It is very easy to follow with carefully laid out topics that introduces one to the complex world of NDK and making clear the strengths and weakness of the NDK. In particular this book is also great for practicing android game developers as it has one of the best introductory android NDK based OpenGL out there. It is also great as a developer reference book, hence this book is recommendable to anyone who wants a quick and easy to understand manual and example code for android NDK.

Find the book at http://www.packtpub.com/android-nativ..., enjoy.
1 review
April 29, 2013
Hey guys this is my true review about this book
just now i started reading this book
really it is good for beginners, actually am new to the android....
i hope this book will make me perfect
Thanks
1 review1 follower
May 30, 2013
Excellent reference material for beginner-intermediate level NDK/JNI and GLES developers, and for those interested in the native application/sensor monitoring & multimedia support on Android. For advanced NDK developers, chapters 8 & 9 are still relevant - highlights include a complete porting exercise of a couple of open-source projects(including the PNG libraries) using the NDK as well as a specified toolchain. (http://www.packtpub.com/android-nativ...)
Here's my drilldown: Chapters 1 & 2 are the obligatory introductions(to setup and JNI). The JNI reference(Chapter 2) is detailed - covering JNI caching, optimized array return strategies, clear explanation of relevant reference types, etc. Chapter 3 is all about debugging the NDK(and you thought _android_log_print() was your only friend!) using Eclipse(including setting breakpoints in the native sources), & GDB(gnu). & CDB. Chapter 4 is a good introduction to GLES,(for beginner-intermediate OpenGL develpers) and clearly explains the 2.0 features(including shaders). A far cry from the 'Red Book' introduction! Native app binding and invocation of OpenGL-ES APIs would have been something that would have enhanced this chapter further. Chapter 5 deals with the Android native API & sensor APIs. Fairly rudimentary, but useful for most developers. Chapter 6 ties in everything one knows about multithreading on any POSIX-compliant system, and facilitates the application of this knowledge onto the Linux subsystem provided by the NDK. Chapter 7 explores the application of five commonly-used multimedia libraries; with working recipes from which you can pull in these modules into your own projects. I found Chapter 8 to be of the most use. It includes the background for porting(and consumption) of a few useful libraries - PNG, boost. Advanced OO paradigms/patterns/tools such as RAII, STL, RTTI, exceptions are all in your reach, thanks to this material. You are also given the relevant information that allows you to choose between various implementations of STL. Chapter 9 finishes off with the consumption of some useful ported libraries, and the re-work needed to get the application working-as-designed on the Android subsystem. All chapters have a mix of good examples that demonstrate the key concept the author is attempting to clarify. Overall, a hearty thumbsup to the author and reviewers. (http://www.packtpub.com/android-nativ...)
13 reviews
June 24, 2013
Over the years I have learned a multitude of languages ranging from Pascal, PHP, C++ and a few others. Every time the keyword high performance pops up C++ also pop up. Over the last few months I have been looking into game development and mobile development. I picked up this book with an open mind and was pleasantly surprised. The cookbook covers a good range of topics from the basic steps of getting up and running to porting native C++ libraries for use in Android Applications.

The first few chapters have a very good step by step introduction to help setup of NDK within Windows, Linux and OSx. It also include a great guide on how to get up and running with eclipse. The progression in the book is well planned and the steps from moving from “Hello World” to using OpenGL ES.

To quote a line from the book not everyone need to use native development, using C++ does not equal better performance, and building a full app in C++ using the NDK just adds a bunch of complexity that you do not need. On the other hand a good place where the NDK would help would be with high calculation applications where you can extract a calculation and build it into a compiled binary to process faster directly on the operating system.

I would not recommend this book to C++ or Android beginners but if your comfortable in both or at least one it can be a very handy tool.
Profile Image for Rama Krishna.
3 reviews
July 25, 2013
A crystal clear explanation to the introduction of Android NDK. The author just focused on the essentials of the topics required to learn NDK and given a constructive approach to the chapters(particularly 1-4) so that any one can start learning this subject(Particularly beginners). This is definitely a good reference for the experienced and as well as experts. This book scores a ton because it included many topics that I always try to understand from the code. Currently i have finished 5 chapters and i am very excited for further chapters as i hardly found good documentation about those concepts elsewhere. Thanks a ton to the Author and publisher for this precious treasure. You can grab this book from the below link.
http://www.packtpub.com/android-nativ...

Profile Image for Sandy Joseph.
3 reviews1 follower
May 4, 2013
With 60 concise recipes, this is the best book for Android Developers
Displaying 1 - 11 of 11 reviews

Can't find what you're looking for?

Get help and learn more about the design.