更新时间:2021-07-27 18:07:50
coverpage
Android Native Development Kit Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Hello NDK
Introduction
Setting up an Android NDK development environment in Windows
Setting up an Android NDK development environment in Ubuntu Linux
Setting up an Android NDK development environment in Mac OS
Updating Android NDK
Writing a Hello NDK program
Chapter 2. Java Native Interface
Loading native libraries and registering native methods
Passing parameters and receiving returns in primitive types
Manipulating strings in JNI
Managing references in JNI
Manipulating classes in JNI
Manipulating objects in JNI
Manipulating arrays in JNI
Accessing Java static and instance fields in the native code
Calling static and instance methods from the native code
Caching jfieldID jmethodID and referencing data to improve performance
Checking errors and handling exceptions in JNI
Integrating assembly code in JNI
Chapter 3. Build and Debug NDK Applications
Building an Android NDK application at the command line
Building an Android NDK application in Eclipse
Building an Android NDK application for different ABIs
Building Android NDK applications for different CPU features
Debugging an Android NDK application with logging messages
Debugging an Android NDK application with CheckJNI
Debugging an Android NDK application with NDK GDB
Debugging an Android NDK application with CGDB
Debugging an Android NDK application in Eclipse
Chapter 4. Android NDK OpenGL ES API
Drawing 2D Graphics and applying transforms with the OpenGL ES 1.x API
Drawing 3D graphics and lighting up the scene with the OpenGL ES 1.x API
Mapping texture to 3D objects with the OpenGL ES 1.x API
Drawing 3D graphics with the OpenGL ES 2.0 API
Displaying graphics with EGL
Chapter 5. Android Native Application API
Creating a native activity with the native_activity.h interface
Creating a native activity with the Android native app glue
Managing native windows at Android NDK
Detecting and handling input events at Android NDK
Accessing sensors at Android NDK
Managing assets at Android NDK
Chapter 6. Android NDK Multithreading
Creating and terminating native threads at Android NDK
Synchronizing native threads with mutex at Android NDK
Synchronizing native threads with conditional variables at Android NDK
Synchronizing native threads with reader/writer locks at Android NDK
Synchronizing native threads with semaphore at Android NDK
Scheduling native threads at Android NDK
Managing data for native threads at Android NDK
Chapter 7. Other Android NDK API
Programming with the jnigraphics library in Android NDK
Programming with the dynamic linker library in Android NDK
Programming with the zlib compression library in Android NDK
Programming audio with the OpenSL ES audio library in Android NDK
Programming with the OpenMAX AL multimedia library in Android NDK
Chapter 8. Porting and Using the Existing Libraries with Android NDK
Porting a library as a shared library module with the Android NDK build system
Porting a library as a static library module with the Android NDK build system
Porting a library with its existing build system using the Android NDK toolchain
Using a library as a prebuilt library
Using a library in multiple projects with import-module
Porting a library that requires RTTI exception and STL support
Chapter 9. Porting an Existing Application to Android with NDK
Porting a command-line executable to Android with an NDK build system
Porting a command-line executable to Android with an NDK standalone compiler
Adding GUI to a ported Android app
Using background threads at porting
Index