Added some more information on how the port works
authorSam Lantinga <slouken@libsdl.org>
Fri, 07 Jan 2011 15:18:17 -0800
changeset 4967f74a3f94c408
parent 4966 a130bc2f0a18
child 4968 379361d5e425
Added some more information on how the port works
README.android
     1.1 --- a/README.android	Fri Jan 07 09:53:08 2011 -0800
     1.2 +++ b/README.android	Fri Jan 07 15:18:17 2011 -0800
     1.3 @@ -10,6 +10,7 @@
     1.4  Android NDK r4 or later
     1.5  http://developer.android.com/sdk/ndk/index.html
     1.6  
     1.7 +
     1.8  ================================================================================
     1.9   How the port works
    1.10  ================================================================================
    1.11 @@ -21,6 +22,16 @@
    1.12  Java project, along with some C support code that communicates with Java
    1.13  - This eventually produces a standard Android .apk package
    1.14  
    1.15 +The Android Java code implements an "activity" and can be found in:
    1.16 +android-project/src/org/libsdl/app/SDLActivity.java
    1.17 +
    1.18 +The Java code loads your game code, the SDL shared library, and
    1.19 +dispatches to native functions implemented in the SDL library:
    1.20 +src/SDL_android.cpp
    1.21 +
    1.22 +Your project must include some glue code that starts your main() routine:
    1.23 +src/main/android/SDL_android_main.cpp
    1.24 +
    1.25  
    1.26  ================================================================================
    1.27   Building an app
    1.28 @@ -48,11 +59,11 @@
    1.29  	build.xml		- build description file, used by ant
    1.30  	default.properties	- holds the ABI for the application, currently android-4 which corresponds to the Android 1.6 system image
    1.31  	local.properties	- holds the SDK path, you should change this to the path to your SDK
    1.32 -	jni/			- directory holding native code and Android.mk
    1.33 +	jni/			- directory holding native code
    1.34  	jni/Android.mk		- Android makefile that includes all subdirectories
    1.35  	jni/SDL/		- directory holding the SDL library files
    1.36  	jni/SDL/Android.mk	- Android makefile for creating the SDL shared library
    1.37 -	jni/src/		- directory holding your application source
    1.38 +	jni/src/		- directory holding your C/C++ source
    1.39  	jni/src/Android.mk	- Android makefile that you should customize to include your source code and any library references
    1.40  	res/			- directory holding resources for your application
    1.41  	res/drawable-*		- directories holding icons for different phone hardware