From 6000ffe2ec8ded23d745e9c8af68bbbeee127b3b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 7 Jan 2011 15:18:17 -0800 Subject: [PATCH] Added some more information on how the port works --- README.android | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.android b/README.android index 23458bd2..58bb227e 100644 --- a/README.android +++ b/README.android @@ -10,6 +10,7 @@ http://developer.android.com/sdk/index.html Android NDK r4 or later http://developer.android.com/sdk/ndk/index.html + ================================================================================ How the port works ================================================================================ @@ -21,6 +22,16 @@ the SDL library Java project, along with some C support code that communicates with Java - This eventually produces a standard Android .apk package +The Android Java code implements an "activity" and can be found in: +android-project/src/org/libsdl/app/SDLActivity.java + +The Java code loads your game code, the SDL shared library, and +dispatches to native functions implemented in the SDL library: +src/SDL_android.cpp + +Your project must include some glue code that starts your main() routine: +src/main/android/SDL_android_main.cpp + ================================================================================ Building an app @@ -48,11 +59,11 @@ android-project/ build.xml - build description file, used by ant default.properties - holds the ABI for the application, currently android-4 which corresponds to the Android 1.6 system image local.properties - holds the SDK path, you should change this to the path to your SDK - jni/ - directory holding native code and Android.mk + jni/ - directory holding native code jni/Android.mk - Android makefile that includes all subdirectories jni/SDL/ - directory holding the SDL library files jni/SDL/Android.mk - Android makefile for creating the SDL shared library - jni/src/ - directory holding your application source + jni/src/ - directory holding your C/C++ source jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references res/ - directory holding resources for your application res/drawable-* - directories holding icons for different phone hardware