android-project/app/src/main/AndroidManifest.xml
author Sam Lantinga <slouken@libsdl.org>
Tue, 24 Oct 2017 00:17:07 -0700
changeset 11653 4130b92b6be4
parent 11650 e7ea7ca30199
child 11667 22aa48874257
permissions -rw-r--r--
Added the ability to set SDL hints from AndroidManifest.xml (thanks Rachel!)
This is especially useful for things like the accelerometer hint which could be needed before application main().
slouken@11647
     1
<?xml version="1.0" encoding="utf-8"?>
slouken@11647
     2
<!-- Replace com.test.game with the identifier of your game below, e.g.
slouken@11647
     3
     com.gamemaker.game
slouken@11647
     4
-->
slouken@11647
     5
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
slouken@11647
     6
    package="org.libsdl.app"
slouken@11647
     7
    android:versionCode="1"
slouken@11647
     8
    android:versionName="1.0"
slouken@11647
     9
    android:installLocation="auto">
slouken@11647
    10
slouken@11653
    11
    <!-- Example of setting SDL hints from AndroidManifest.xml:
slouken@11653
    12
    <meta-data android:value="0" android:name="SDL_ENV.SDL_ACCELEROMETER_AS_JOYSTICK"/>
slouken@11653
    13
     -->
slouken@11653
    14
     
slouken@11650
    15
    <!-- Android 4.0.1 -->
slouken@11650
    16
    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="16" />
slouken@11647
    17
slouken@11647
    18
    <!-- OpenGL ES 2.0 -->
slouken@11647
    19
    <uses-feature android:glEsVersion="0x00020000" />
slouken@11647
    20
slouken@11647
    21
    <!-- Allow writing to external storage -->
slouken@11647
    22
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
slouken@11647
    23
    <!-- Allow access to the vibrator -->
slouken@11647
    24
    <uses-permission android:name="android.permission.VIBRATE" />
slouken@11647
    25
slouken@11647
    26
    <!-- if you want to capture audio, uncomment this. -->
slouken@11647
    27
    <!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
slouken@11647
    28
slouken@11647
    29
    <!-- Create a Java class extending SDLActivity and place it in a
slouken@11647
    30
         directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
slouken@11647
    31
 
slouken@11647
    32
         then replace "SDLActivity" with the name of your class (e.g. "MyGame")
slouken@11647
    33
         in the XML below.
slouken@11647
    34
slouken@11647
    35
         An example Java class can be found in README-android.md
slouken@11647
    36
    -->
slouken@11647
    37
    <application android:label="@string/app_name"
slouken@11647
    38
        android:icon="@mipmap/ic_launcher"
slouken@11647
    39
        android:allowBackup="true"
slouken@11647
    40
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
slouken@11647
    41
        android:hardwareAccelerated="true" >
slouken@11647
    42
        <activity android:name="SDLActivity"
slouken@11647
    43
            android:label="@string/app_name"
slouken@11647
    44
            android:configChanges="keyboardHidden|orientation|screenSize"
slouken@11647
    45
            >
slouken@11647
    46
            <intent-filter>
slouken@11647
    47
                <action android:name="android.intent.action.MAIN" />
slouken@11647
    48
                <category android:name="android.intent.category.LAUNCHER" />
slouken@11647
    49
            </intent-filter>
slouken@11647
    50
            <!-- Drop file event -->
slouken@11647
    51
            <!--
slouken@11647
    52
            <intent-filter>
slouken@11647
    53
                <action android:name="android.intent.action.VIEW" />
slouken@11647
    54
                <category android:name="android.intent.category.DEFAULT" />
slouken@11647
    55
                <data android:mimeType="*/*" />
slouken@11647
    56
            </intent-filter>
slouken@11647
    57
            -->
slouken@11647
    58
        </activity>
slouken@11647
    59
    </application>
slouken@11647
    60
slouken@11647
    61
</manifest>