Skip to main content
5 of 5
added 2 characters in body
Ellis
  • 3.6k
  • 20
  • 28

Android APIs are Java. Since 2010, Google provides the NDK (a SDK) for C/C++ developers.

The NDK offers two ways:

  • for android 1.5 devices, you can load an elf library and uses it from the java application via a JNI bridge
  • for android 2.3 devices, you can use a NativeActivity to bypass the Java Activity code for Fullscreen Application.

The NDK offers few C/C++ API:

  • a pseudo libc called bionics: many functions aren't availabled
  • a pthread library
  • OpenGL ES 1.x (>Android 1.5) and OpenGL ES 2.x (Android 2.0)
  • OpenSL (limited support on Android 2.3)

But many API are Java only (also available via JNI).

NDK 5 version is the first usable for C++ developers because it offers:

  • RTTI
  • Exceptions supports
  • STLport
  • gdb support for multi-threaded programs

The most painful operation is debugging on android devices. So i develop my own multi-platform framework (OS X, Windows, Linux, iOS and Android) to debug first on desktop platform, next iOS platform (on Simulator) and Last (Android).

The android Emulator (not a simulator) have a poor performance and can't emulate OpenGL ES 2.x. I recommend real devices to develop.

You can find many useful informations :

Ellis
  • 3.6k
  • 20
  • 28