Commit Graph

44 Commits

Author SHA1 Message Date
Miku AuahDark efaf0f7aa4 Update copyright year to 2022. 2022-01-01 10:44:50 +08:00
Miku AuahDark 645bae0831 Fixed /sdcard/Android/data/org.love2d.android/files/games/lovegame lookup.
See #194 for more information.
2021-12-28 14:48:34 +08:00
Miku AuahDark b17ba72668 Remove hidapi from getLibraries.
libsdl-org/SDL@5b646cd19e
2021-12-05 13:12:35 +08:00
Miku AuahDark b6cb0d037e Minor cleanup to GameActivity. 2021-12-05 12:03:23 +08:00
Miku AuahDark a3fc057064 Revert "Implement partial "Share to LOVE" support." 2021-12-05 10:08:17 +08:00
Miku AuahDark 25de1b5de3 Remove redundant GameActivity.getAssetManager() 2021-11-05 13:59:46 +08:00
Miku AuahDark ab850bfc5d Implement GameActivity.buildFileLookup 2021-11-05 13:58:02 +08:00
Miku AuahDark ba0f568f15 Improve GameActivity.getCRequirePath() 2021-11-02 17:42:56 +08:00
Miku AuahDark 444a61b945 Add GameActivity.getCRequirePath()
Used by love.filesystem C loader later.
2021-11-01 20:32:10 +08:00
Miku AuahDark d023500320 Only copy game archive if it's requested. 2021-02-06 22:09:47 +08:00
Miku AuahDark 0480f4bac7 Add getAssetManager() method.
This method will be called from C++ side.
2021-02-06 19:30:08 +08:00
Miku AuahDark aaae1f4392 Look in /sdcard/lovegame too in Android 9 and earlier for backward compatibility.
See #194 for further explanation about this change.
2020-12-25 23:06:41 +08:00
Miku AuahDark 596cffc9dc Rename openURL -> openURLFromLOVE
It's probably a good idea to remove this function in 12.0 and replace
it by calls to SDL_OpenURL() in LOVE C++ code instead.
2020-12-24 22:48:58 +08:00
Miku AuahDark b96fd660f9 Pass sample rate and frames/buffer to opensl_latency.cpp to be used with Oboe later. 2020-12-24 20:08:47 +08:00
Miku AuahDark 0e41ef20b3 Android 11.0 compatibility (#195)
* Update dependencies and target SDK
* Update Gradle to 6.6.1
* Update target API level to 30
* Update AGP to 4.0.1
* Update Android Build Dependencies (androidx.appcompat:appcompat:1.2.0, androidx.multidex:multidex:2.0.1)
* Update readme
* Move /sdcard/lovegame directory. (closes #194)
* Potentially fixes black screen when reopening LOVE from app drawer (fixes #190)
* Downloader cleanup.
* Merge SDL AndroidManifest.xml to LOVE
* Implement partial "Share to LOVE" support.
* Enable resizeableActivity
2020-10-10 01:33:06 +08:00
Miku AuahDark 31d7affd91 Remove setImmersiveMode code as it conflicts with SDL's immersive mode code.
Fixes #191
2020-06-22 12:57:38 +08:00
Miku AuahDark 20329a65a6 Do not use ID 1 for request code
As it's reserved by SDL for its Android_JNI_RequestPermission
2020-05-05 11:26:25 +08:00
Miku AuahDark b1740eb4b6 Add license.txt and license notice to each Java files. 2020-02-01 00:37:34 +08:00
Miku AuahDark ba299eeafb Fix embed flavor not starting up. 2020-01-31 23:20:49 +08:00
Miku AuahDark 7999e17a76 Exclude "Download" service/activity from embed flavor. 2020-01-31 21:34:21 +08:00
Miku AuahDark 5a80990790 Perform handleIntent conditional whetever it's embed build or not. 2020-01-31 14:58:53 +08:00
Miku AuahDark 59a5fcb875 Fixed mic permission requested 3 times and dialog not showing. 2019-09-29 15:24:35 +08:00
Miku AuahDark 05e193ddbd Add function to retrieve and request mic permission. 2019-09-29 12:46:17 +08:00
Miku AuahDark f18cf70c15 Minor changes to GameActivity.
Nothing that may cause something break. Mainly reordering & line optmization
changes.
2019-08-10 16:01:52 +08:00
Miku AuahDark 5090a072b2 Minor manifest change and some GameActivity changes.
Fixed storage permission request and do not hardcode "game.love" as the cache output
file.
2019-07-26 13:01:25 +08:00
Miku AuahDark 117bba5ff2 Minor changes.
Remove vibrate permission string, use Manifest.permission.VIBRATE instead!

Fix code style.

Set gamePath to empty when it fails to detect any game.love
2019-07-20 21:33:52 +08:00
Miku AuahDark 78e88a7473 Override getMainSharedObject()
This theoretically allows LOVE libs not to be extracted in Marshmallow
and later by utilizing extractNativeLibs=false. However this is left to
users (developer) to decide whetever to use this or not.
2019-07-20 20:49:25 +08:00
Miku AuahDark a2c79d95e0 Flip the storage permission check. 2019-07-20 10:03:32 +08:00
Miku AuahDark f761e43904 Fix *.love file association in Nougat and later.
Note that the file association is rather hacky but I can't find any method
which is compatible in Nougat and later as file:// URI is banned there.
2019-07-10 12:10:36 +08:00
Miku AuahDark cd6463b4e4 Implement content:// URI 2019-07-10 10:14:10 +08:00
Miku AuahDark 9298bed843 Fix embedded game.love loading if there's no external storage permission given.
Mainly affect Android M and later devices.
2019-07-10 09:16:06 +08:00
Tae Hanazono 6eafa708f9 Fix setImmersiveMode using unsupported flags in some older devices. 2019-02-09 18:53:42 +08:00
Tae Hanazono 53d24a1b5f Added method to retrieve safe area insets. 2019-02-08 23:56:23 +08:00
Tae Hanazono 3b7407ab34 Fix onResume using unsupported flags in some older devices. 2019-02-08 20:20:37 +08:00
Martin Felis 692ce8bb51 Updated build system to use compileSdkVersion 28. 2018-12-07 22:39:06 +01:00
Martin Felis 94c8a99ddc Properly ask and check for permissions on android >= 23.
On the first run it will ask for permission and block the LÖVE thread until
it has been granted. Thanks to Tae Hanzano for the initial draft.
2018-12-07 17:32:01 +01:00
Martin Felis 1ea86d3305 Properly using SDL 2.0.9 paths and android 26 compatibility layers. 2018-12-07 17:24:32 +01:00
Martin Felis ebd4a0ad4f Initial works to support 0.11.x, disabled armeabi builds, using now clang and libc++ instead of gnustl 2018-02-02 21:10:33 +01:00
Martin Felis 906a7cc00b Cleaned up formatting of Java code 2018-01-23 15:28:20 +01:00
Martin Felis 5f4aeb2d71 merge 2018-01-23 15:22:57 +01:00
Martin Felis 0afdf271a2 Cleaned up logic of loading games on the Java side of the App 2018-01-22 22:52:16 +01:00
cigumo 957330d722 Changes Filesystem::setSource mount order on Android
Simplifies the way setSource is handled on Android. It tries to mount
first and if that fails it will copy to memory and mount.

The /sdcard/lovegame fallback is moved to GameActivity.java.

Also a flag is added (mustCacheArchive) that will copy the game.love
file to the cache dir, so it can be mounted directly and not loaded to
memory, which does not work for large .love files.

The Filesystem.cpp change was also submitted to rude/love repo in this
push request: https://bitbucket.org/rude/love/pull-requests/99
2017-11-16 19:53:41 -03:00
Tiago Koji Castro Shibata b3db9d4839 Add GameActivity.getMusicStreamVolume 2017-07-10 16:09:28 -03:00
Henrique Gemignani Passos Lima ab888ac39f Move the java code. 2017-02-19 10:41:46 -03:00