Skip to Content
Pro Android C++ with the NDK
book

Pro Android C++ with the NDK

by Onur Cinar
December 2012
Intermediate to advanced
416 pages
15h
English
Apress

Overview

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 NDK is an advanced tutorial and professional reference for today's more sophisticated app developers now porting, developing or employing C++ and other native code to integrate into the Android platform to run sophisticated native apps and better performing apps in general. Using a 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. Pro Android C++ with the NDK also covers the following:

  • The Android platform, and getting up to speed with the Android NDK, and exploring the APIs that are provided in native space.

  • An overview of Java Native Interface (JNI), and auto-generating JNI code through Simplified Wrapper and Interface Generator (SWIG).

  • An introduction to Bionic API, native networking. native multithreading, and the C++ Standard Template Library (STL) support.

  • Native graphics and sound using JNI Graphics, OpenGL ES, and OpenSL ES.

  • Debugging and troubleshooting native applications using Logging, GNU Debugger (GDB), Eclipse Debugger, Valgrind, strace, and other tools.

  • Profiling native code using GProf to identify performance bottlenecks, and NEON/SIMD optimization from an advanced perspective, with tips and recommendations.

  • What you'll learn

  • What is the Android platform, and getting up to speed with the Android NDK.

  • Using the Eclipse IDE to streamline developing native applications

  • How to use Java Native Interface (JNI) to connect native code to Java world.

  • Auto-generate JNI code using Simplified Wrapper and Interface Generator (SWIG).

  • Introduction to Bionic API

  • Networking through POSIX sockets

  • Developing multithreaded applications using POSIX Threads, and Java Threads.

  • Debug through Logging, GNU Debugger (GDB), and Eclipse Debugger

  • Analyze memory issues through Valgrind

  • C++ Support and Standard Template Library STL

  • Native Graphics through JNI Graphics and OpenGL ES

  • Native Sound through OpenSL ES

  • Profiling the native code using GProf to identify performance bottlenecks

  • Optimize code using SIMD/NEON

  • Who this book is for

    This book is for software professionals who are interested in leveraging the Android NDK to port their existing native-code app, 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.

    Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
    and much more.

    Read now

    Unlock full access

    More than 5,000 organizations count on O’Reilly

    AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

    QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
    Julian F.
    Head of Cybersecurity
    QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
    Addison B.
    Field Engineer
    QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
    Amir M.
    Data Platform Tech Lead
    QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
    Mark W.
    Embedded Software Engineer

    You might also like

    Android NDK Beginner`s Guide - Second Edition

    Android NDK Beginner`s Guide - Second Edition

    Sylvain Ratabouil
    Android High Performance Programming

    Android High Performance Programming

    Enrique López Mañas, Diego Grancini

    Publisher Resources

    ISBN: 9781430248279Purchase book