-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
282 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Replace com.test.game with the identifier of your game below, e.g. | ||
com.gamemaker.game | ||
--> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="org.libsdl.app.tomato" | ||
android:versionCode="1" | ||
android:versionName="1.0" | ||
android:installLocation="auto"> | ||
|
||
<!-- OpenGL ES 2.0 --> | ||
<uses-feature android:glEsVersion="0x00020000" /> | ||
|
||
<!-- Touchscreen support --> | ||
<uses-feature | ||
android:name="android.hardware.touchscreen" | ||
android:required="false" /> | ||
|
||
<!-- Game controller support --> | ||
<uses-feature | ||
android:name="android.hardware.bluetooth" | ||
android:required="false" /> | ||
<uses-feature | ||
android:name="android.hardware.gamepad" | ||
android:required="false" /> | ||
<uses-feature | ||
android:name="android.hardware.usb.host" | ||
android:required="false" /> | ||
|
||
<!-- External mouse input events --> | ||
<uses-feature | ||
android:name="android.hardware.type.pc" | ||
android:required="false" /> | ||
|
||
<!-- Audio recording support --> | ||
<!-- if you want to capture audio, uncomment this. --> | ||
<!-- <uses-feature | ||
android:name="android.hardware.microphone" | ||
android:required="false" /> --> | ||
|
||
<!-- Camera support --> | ||
<!-- if you want to record video, uncomment this. --> | ||
<!-- | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
<uses-feature android:name="android.hardware.camera" /> | ||
--> | ||
|
||
<!-- Allow downloading to the external storage on Android 5.1 and older --> | ||
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" /> --> | ||
|
||
<!-- Allow access to Bluetooth devices --> | ||
<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM --> | ||
<!-- <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /> --> | ||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> --> | ||
|
||
<!-- Allow access to the vibrator --> | ||
<uses-permission android:name="android.permission.VIBRATE" /> | ||
|
||
<!-- if you want to capture audio, uncomment this. --> | ||
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> --> | ||
|
||
<!-- Create a Java class extending SDLActivity and place it in a | ||
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java | ||
then replace "SDLActivity" with the name of your class (e.g. "MyGame") | ||
in the XML below. | ||
An example Java class can be found in README-android.md | ||
--> | ||
<application android:label="@string/app_name" | ||
android:icon="@mipmap/ic_launcher" | ||
android:appCategory="social" | ||
android:allowBackup="true" | ||
android:theme="@style/AppTheme" | ||
android:hardwareAccelerated="true" > | ||
|
||
<!-- Example of setting SDL hints from AndroidManifest.xml: | ||
<meta-data android:name="SDL_ENV.SDL_ANDROID_TRAP_BACK_BUTTON" android:value="0"/> | ||
--> | ||
|
||
<activity android:name="TomatoActivity" | ||
android:label="@string/app_name" | ||
android:alwaysRetainTaskState="true" | ||
android:launchMode="singleInstance" | ||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation" | ||
android:preferMinimalPostProcessing="true" | ||
android:exported="true" | ||
> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
<!-- Let Android know that we can handle some USB devices and should receive this event --> | ||
<intent-filter> | ||
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> | ||
</intent-filter> | ||
<!-- Drop file event --> | ||
<!-- | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<data android:mimeType="*/*" /> | ||
</intent-filter> | ||
--> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
18 changes: 18 additions & 0 deletions
18
android/app/java/org/libsdl/app/tomato/TomatoActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.libsdl.app.tomato; | ||
|
||
import org.libsdl.app.SDLActivity; | ||
|
||
public class TomatoActivity extends SDLActivity { | ||
protected String[] getLibraries() { | ||
return new String[] { | ||
// "SDL3", // we link statically | ||
// "SDL3_image", | ||
// "SDL3_mixer", | ||
// "SDL3_net", | ||
// "SDL3_ttf", | ||
// "main" | ||
"tomato" | ||
}; | ||
} | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#3F51B5</color> | ||
<color name="colorPrimaryDark">#303F9F</color> | ||
<color name="colorAccent">#FF4081</color> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="app_name">Tomato</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<resources> | ||
|
||
<!-- Base application theme. --> | ||
<!-- <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"> --> | ||
<!--<style name="AppTheme" parent="android:Theme.AppCompat">--> | ||
<style name="AppTheme" parent="android:Theme"> | ||
<!-- Customize your theme here. --> | ||
</style> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters