Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some android fixes and added additional hardware features. #1795

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dependencies/extension-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ buildscript {
apply plugin: 'com.android.library'

android {
namespace 'org.haxe.extension'
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION

Expand Down
4 changes: 1 addition & 3 deletions dependencies/extension-api/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.haxe.extension" >

</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
1 change: 1 addition & 0 deletions templates/android/template/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ System.setProperty('java.awt.headless','false')
} */

android {
namespace "::APP_PACKAGE::"
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
::if (ANDROID_GRADLE_PLUGIN>="4.0")::ndkPath '::ANDROID_NDK_ROOT_ESCAPED::'::end::
Expand Down
33 changes: 31 additions & 2 deletions templates/android/template/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="::APP_PACKAGE::" android:versionCode="::APP_BUILD_NUMBER::" android:versionName="::APP_VERSION::" android:installLocation="::ANDROID_INSTALL_LOCATION::">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="::APP_BUILD_NUMBER::" android:versionName="::APP_VERSION::" android:installLocation="::ANDROID_INSTALL_LOCATION::">

<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<!-- 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" />

<!-- Low latency audio -->
<uses-feature android:name="android.hardware.audio.low_latency" android:required="false" />
<uses-feature android:name="android.hardware.audio.pro" android:required="false" />

::foreach ANDROID_PERMISSIONS::<uses-permission android:name="::__current__::" />
::end::

Expand All @@ -25,6 +40,20 @@

</intent-filter>

<intent-filter>

<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />

</intent-filter>

<intent-filter>

<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />

</intent-filter>

</activity>

</application>
Expand Down
1 change: 1 addition & 0 deletions templates/extension/dependencies/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ buildscript {
apply plugin: 'com.android.library'

android {
namespace "org.haxe.extension.::extensionLowerCase::"
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.haxe.extension.::extensionLowerCase::" >



</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
1 change: 1 addition & 0 deletions tools/platforms/AndroidPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ class AndroidPlatform extends PlatformTarget
"android.permission.WAKE_LOCK",
"android.permission.INTERNET",
"android.permission.VIBRATE",
"android.permission.BLUETOOTH",
"android.permission.ACCESS_NETWORK_STATE"
]);
context.ANDROID_GRADLE_VERSION = project.config.getString("android.gradle-version", "7.4.2");
Expand Down
Loading