The Native Android API

Overview<具体参考 : http://mobilepearls.com/labs/native-android-api/#native-application-api>

Android exposes a native API to applications through the Native Development Kit (NDK). It is described in the $NDK/docs/STABLE-APIS.html document and summarized below:

Name Include Linking (LOCAL_LDLIBS :=...) Android version
C runtime library (libc) #include ... Automatic 1.5
Java Native Interface #include <jni.h> Automatic 1.5
System properties #include <sys/system_properties.h> Automatic 1.5
Math #include <math.h> Automatic (-lm not needed) 1.5
POSIX Threads (pthreads) #include <pthread.h> Automatic (-lpthread not needed) 1.5
C++ #include .. Automatic (-lstdc++ not needed) 1.5
Android logging API #include <android/log.h> -llog 1.5
Zlib #include <zconf.h> #include <zlib.h> -lz 1.5
Dynamic linker #include <dlfcn.h> -ldl 1.5
OpenGL ES 1.x #include <GLES/gl.h> #include <GLES/glext.h> -lGLESv1_CM 1.6
OpenGL ES 2.0 #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> -lGLESv2 2.0
Android bitmap API #include <android/bitmap.h> -ljnigraphics 2.2
EGL #include <EGL/egl.h> #include <EGL/eglext.h> #include <EGL/eglplatform.h> -lEGL 2.3
OpenSL ES #include <SLES/OpenSLES.h> #include <SLES/OpenSLES_Platform.h> #include <SLES/OpenSLES_Android.h> #include <SLES/OpenSLES_AndroidConfiguration.h> -lOpenSLES 2.3
Android native application API Event loop: #include <android/looper.h>
Input events: #include <android/input.h> #include <android/keycodes.h>
Sensor events: #include <android/sensor.h>
Window/Surface management: #include <android/rect.h> #include <android/window.h> #include <android/native_window.h> #include <android/native_window_jni.h>
Assets: #include <android/asset_manager.h>
Configuration: #include <android/configuration.h>
OBB files: #include <android/storage_manager.h> #include <android/obb.h>
Native activity: #include <android/native_activity.h>
-landroid 2.3
OpenMAX AL #include <OMXAL/OpenMAXAL.h> #include <OMXAL/OpenMAXAL_Platform.h> #include <OMXAL/OpenMAXAL_Android.h> -lOpenMAXAL 4.0
OpenGL ES 3.0 #include <GLES3/gl3.h> #include <GLES3/gl3ext.h> -lGLESv3 4.3
posted @ 2014-05-19 01:21  MMLoveMeMM  阅读(421)  评论(0编辑  收藏  举报