Pro Android C++ with the NDK (Professional Apress)

Onur Cinar · Apress eBooks · 2012

Android is one of the major players in the mobile phone market. Android is a mobile platform that is built on the top of Linux operating system. The native-code support on Android offers endless opportunities to application developers, not limited the functionality that is provided by Android framework. Pro Android C++ with the NDKNative Development Kit) is an advanced tutorial and professional reference for today's more sophisticated app developers now porting, developing or employing C++ and other native codeto integrateinto the Android platform to run more graphically intense apps, more sophisticated game apps and better performing apps in general. Introduces the Android platform, and getting up to speed with the Android NDK, and exploring the APIs that are provided in native space. Gives an overview of Java Native Interface (JNI), native multithreading, the C++ Standard Template Library (STL), and NEON/SIMD optimization from an advanced perspective, with tips and recommendations. Using a native-code (C/C++) game app case study, this book explores tools for troubleshooting, debugging, analyzing memory issues, unit testing, unit test code coverage, performance measurement, on native applications, as well as integrating the Android NDK toolchain into existing Autoconf, Makefile, CMake, or JAM based build systems. What youll learn What is the Android platform, and getting up to speed with the Android NDK What are the Android NDK APIs including Native Activity support, OpenGL ES, OpenSL ES, OpenMAX AL, JNI Graphics, and Sensor APIs. How to use Java Native Interface (JNI), Simplified Wrapper and Interface Generator (SWIG) to automatically generate the JNI code to connect native-code to the Java world. What are and how to use C++ and the Standard Template Library (STL) How to do multithreading through POSIX Threads How to optimize code through NEON/SIMD, compiler vectorization, and intrinsics How to debug through GDB, DDD, and the Eclipse Debugger How to analyze memory through Valgrind, Electric Fence, Memwatch, YAMC How to measure App performance through GProf How to do unit testing and code coverage through GCov How to use and integrate the Android NDK toolchain into existing build systems such as Autoconf, Makefiles, CMake, and JAM Who this book is for This book is for software professionals who are interested in leveraging the Android NDK to port their existing native-codeapp, such as C++, to the Android platform, as well as existing Android developers who are interested in improving their apps overall performance by utilizing native-code. Table of Contents Getting Started with C++ on Android Exploring the Android NDK Communicating with Native Code using JNI Auto-Generate JNI Code Using SWIG Logging, Debugging, and Troubleshooting Bionic API Primer Native Threads POSIX Socket API: Connection Oriented Communication POSIX Socket API: Connetionless Communication POSIX Socket API: Local Communication C++ Support Native Graphics API Sound NativeAPI Profiling and NEON Optimization

Read the paper · More papers on PaperTik