author | Sam Lantinga <slouken@libsdl.org> |
Fri, 02 Nov 2012 02:37:49 -0700 | |
changeset 6631 | 47ab7ba21530 |
parent 6392 | fa7eb111f994 |
child 6632 | 147f85ac2e4b |
permissions | -rw-r--r-- |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
3 |
<!-- Replace org.libsdl.app with the identifier of your game, e.g. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
4 |
com.gamemaker.game |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
5 |
--> |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 |
package="org.libsdl.app" |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 |
android:versionCode="1" |
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
8 |
android:versionName="1.0" |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
9 |
android:installLocation="auto"> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
10 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
11 |
<!-- Create a Java class extending SDLActivity and place it in a |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
12 |
directory under src matching the package, e.g. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
13 |
src/com/gamemaker/game/MyGame.java |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
14 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
15 |
/**********************************************************/ |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
16 |
package com.gamemaker.game; |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
17 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
18 |
import org.libsdl.app.SDLActivity; |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
19 |
import android.os.*; |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
20 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
21 |
/* |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
22 |
* A sample wrapper class that just calls SDLActivity |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
23 |
*/ |
6392
fa7eb111f994
Fixed bug 1564 - SDL has no function to open a screen keyboard on Android.
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
24 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
25 |
public class MyGame extends SDLActivity { |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
26 |
protected void onCreate(Bundle savedInstanceState) { |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
27 |
super.onCreate(savedInstanceState); |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
28 |
} |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
29 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
30 |
protected void onDestroy() { |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
31 |
super.onDestroy(); |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
32 |
} |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
33 |
} |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
34 |
/**********************************************************/ |
6392
fa7eb111f994
Fixed bug 1564 - SDL has no function to open a screen keyboard on Android.
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
35 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
36 |
then replace "SDLActivity" in the XML below with the name of |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
37 |
your class, e.g. "MyGame" ... |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
38 |
--> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
39 |
<application android:label="@string/app_name" |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
40 |
android:icon="@drawable/icon" |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
41 |
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 |
<activity android:name="SDLActivity" |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 |
android:label="@string/app_name"> |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 |
<intent-filter> |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
45 |
<action android:name="android.intent.action.MAIN" /> |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
46 |
<category android:name="android.intent.category.LAUNCHER" /> |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
47 |
</intent-filter> |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
48 |
</activity> |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
49 |
</application> |
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
50 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
51 |
<!-- Android 2.1 --> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
52 |
<uses-sdk android:minSdkVersion="10" /> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
53 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
54 |
<!-- OpenGL ES 2.0 --> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
55 |
<uses-feature android:glEsVersion="0x00020000" /> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
56 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
57 |
<!-- Allow writing to external storage --> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
6392
diff
changeset
|
58 |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
59 |
</manifest> |