Updated the Android project template and README.android

Added information on how to customize your application name and icon.
Added information on using STL with an Android application
Increased the minimum API level to 10, because that's the lowest API
that currently has an emulator image for testing.
This commit is contained in:
Sam Lantinga
2012-11-02 02:37:49 -07:00
parent 525b3ca0e9
commit 94ca45bd69
11 changed files with 242 additions and 61 deletions

View File

@@ -1,12 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<!-- Replace org.libsdl.app with the identifier of your game, e.g.
com.gamemaker.game
-->
package="org.libsdl.app"
android:versionCode="1"
android:versionName="1.0">
android:versionName="1.0"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="5" />
<!-- Create a Java class extending SDLActivity and place it in a
directory under src matching the package, e.g.
src/com/gamemaker/game/MyGame.java
<application android:label="@string/app_name" android:icon="@drawable/icon">
/**********************************************************/
package com.gamemaker.game;
import org.libsdl.app.SDLActivity;
import android.os.*;
/*
* A sample wrapper class that just calls SDLActivity
*/
public class MyGame extends SDLActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
protected void onDestroy() {
super.onDestroy();
}
}
/**********************************************************/
then replace "SDLActivity" in the XML below with the name of
your class, e.g. "MyGame" ...
-->
<application android:label="@string/app_name"
android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<activity android:name="SDLActivity"
android:label="@string/app_name">
<intent-filter>
@@ -15,4 +47,13 @@
</intent-filter>
</activity>
</application>
<!-- Android 2.1 -->
<uses-sdk android:minSdkVersion="10" />
<!-- OpenGL ES 2.0 -->
<uses-feature android:glEsVersion="0x00020000" />
<!-- Allow writing to external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>