[android]: (feat) emuready launch intent + redesign #49

Closed
Producdevity wants to merge 46 commits from feat/android-emuready into master

46 commits

Author SHA1 Message Date
780e008f1a fix: restore files to match master state after problematic merge
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
2025-07-30 15:43:28 +02:00
835e9ed205 fix: remove orphaned ffmpeg submodule reference
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
2025-07-30 15:36:36 +02:00
955e13e7b6 fix: remove orphaned dynarmic xbyak submodule reference 2025-07-30 15:35:49 +02:00
998f496cf8 fix: remove SDL, ffmpeg and duplicate xbyak entries from .gitmodules to match master 2025-07-30 15:33:59 +02:00
b1c6c3a083 fix: reset .gitmodules to match master 2025-07-30 15:31:46 +02:00
7136733575 fix: remove SDL directory as it's now handled by CPM
All checks were successful
eden-license / license-header (pull_request) Successful in 36s
2025-07-30 15:27:15 +02:00
6f31a10699 fix: reset submodules to match master and remove ffmpeg submodule
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
2025-07-30 15:21:30 +02:00
840aae1671 fix: remove SDL submodule as it's now handled by CPM
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
2025-07-30 15:09:13 +02:00
64e8e962c2 chore: Remove unnecessary SDL submodule entry
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
2025-07-30 15:08:28 +02:00
97cadb4e7c fix: add missing SDL submodule
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
2025-07-30 14:58:27 +02:00
245408ccf0 Merge branch 'master' of eden:eden-emu/eden into feat/android-emuready
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
2025-07-30 14:36:56 +02:00
e8f63cf7ee fix: improve intent launch handling in EmulationFragment
All checks were successful
eden-license / license-header (pull_request) Successful in 37s
2025-07-30 14:35:22 +02:00
dd6d6b4cf9 fix: reset navigation graph with new intent data in EmulationActivity 2025-07-30 14:34:20 +02:00
2c4d5f7a81 refactor: wip, trying to fix intent launching
All checks were successful
eden-license / license-header (pull_request) Successful in 29s
2025-07-27 14:05:20 +02:00
e99b129cc2 style: remove unused DriverResolver and refactor driver handling in CustomSettingsHandler
- Deleted `DriverResolver`
- Moved and streamlined driver path extraction logic into `CustomSettingsHandler`.
- Improved string resource usage and ensured consistent formatting across dialogs.
2025-07-27 13:35:55 +02:00
3e3e35f558 fix: exclude Android from gamemode sources in CMakeLists.txt 2025-07-27 13:14:44 +02:00
6cb45e67fc style: add GradientBorderCardView with theme-aware gradient border implementation 2025-07-27 13:14:18 +02:00
fcd1b0ecc5 style: implement Eden theme 2025-07-27 13:13:26 +02:00
716e30e204 style: update SPDX license information in CarouselRecyclerView 2025-07-25 20:32:00 +02:00
1a5b6083e7 style: code formatting and remove unused imports in MainActivity 2025-07-25 20:20:57 +02:00
9838ebaef9 style: format code and remove unused imports in GamesFragment 2025-07-25 18:50:54 +02:00
f71872d937 style: remove redundant public modifier and fix variable declaration 2025-07-25 18:49:18 +02:00
6e88a9f1f6 style: format code and remove unnecessary blank lines and imports 2025-07-25 18:46:01 +02:00
0ea1870bbc feat: driver installation dialogs with string resources 2025-07-25 18:38:02 +02:00
6b65f95cfa style: remove unnecessary blank line in build.gradle.kts 2025-07-25 18:34:27 +02:00
5008b23062 fix: formatting in DriverGroupAdapter.kt and unused iimport 2025-07-25 18:34:04 +02:00
0dda4fd3ce style: format code 2025-07-25 18:33:29 +02:00
eb3d221ec6 Fix malformed XML in string translations
The `shader_backend_glasm` and `shader_backend_spirv` strings had an extra `string>` tag in multiple language files. This commit removes the extraneous tag.

Additionally, new strings related to Intent Launch, Custom Config, and Driver handling have been added to the default `strings.xml` file.

* src/android/app/src/main/res/values-ru/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-fr/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-pt-rPT/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-id/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-pl/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values/strings.xml: Remove extraneous `string>` tag and add new strings.
* src/android/app/src/main/res/values-fa/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-ar/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-he/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-ckb/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-sr/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-it/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-ja/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-vi/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-cs/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-hu/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-nb/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-uk/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-ko/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-es/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-de/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-zh-rCN/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-pt-rBR/strings.xml: Remove extraneous `string>` tag.
2025-07-25 18:29:58 +02:00
953e07d1d7 Fix typos in Chinese (Traditional) translation
* src/android/app/src/main/res/values-zh-rTW/strings.xml: Remove extra 'string' from shader backend options.
2025-07-25 18:28:22 +02:00
e3acf3051c Merge branch 'feat/android-emuready' of eden:eden-emu/eden into feat/android-emuready
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
2025-07-23 17:57:53 +02:00
4155efc7b9 Merge branch 'master' of eden:eden-emu/eden into feat/android-emuready 2025-07-23 17:57:24 +02:00
d76218baa1 Add user feedback with Toast messages for custom settings and driver handling
All checks were successful
eden-license / license-header (pull_request) Successful in 29s
* Introduced Toast messages across `CustomSettingsHandler`, `DriverResolver`, and `EmulationFragment` to improve user interaction and feedback for key operations.
* Enhanced error handling and confirmation dialogs, including options to launch with default settings when custom settings fail.
2025-07-23 09:58:31 +02:00
e2f2cfa476 refactor: extract and streamline EmuReady intent handling
* Moved custom settings logic from `onCreate` to `handleEmuReadyIntent` for better readability.
* Added `showLaunchConfirmationDialog` to confirm game launch with or without custom settings.
* Updated `CustomSettingsHandler.findGameByTitleId` to show user feedback via `Toast`.
* Ensured improved separation of concerns and reusable methods.
2025-07-23 09:58:31 +02:00
1eeab7e19e fix: suppress warning for predictive back gesture
* src/android/app/src/main/AndroidManifest.xml: Set targetApi to 33 and
  enable onBackInvokedCallback to support the Android 13 predictive back gesture.
  Also, add the tools namespace.
2025-07-23 09:58:31 +02:00
9adb75b0dc fix: refactor EmulationFragment
*handler callbacks using nullable Runnables
  * Remove unused `cpuBackend` and `gpuDriver` variables.
  * Use lambda syntax for `Slider.OnChangeListener`.
  * Remove unused imports.
2025-07-23 09:58:31 +02:00
ab50b5cc9a fix: deprecating warning for getLayoutDirection and LAYOUT_DIRECTION_LTR 2025-07-23 09:58:31 +02:00
e00abd0281 chore: removed unnecessary typecasting 2025-07-23 09:58:31 +02:00
e1efec5a24 Support loading custom game settings via intent
This commit introduces the ability to launch games with custom configurations supplied via an Android intent. This allows external applications to provide specific settings for a game at launch time.

Key changes include:

*   **`CustomSettingsHandler.kt`**: A new class responsible for:
    *   Processing incoming intents with custom settings.
    *   Finding the target game in the user's library by its title ID.
    *   Writing the custom settings to a per-game INI file (`config/custom/<title_id>.ini`).
    *   Handling potential conflicts if a custom configuration already exists, prompting the user to overwrite or cancel.
    *   Integrating with `DriverResolver` to check for and handle required GPU drivers specified in the custom settings.
    *   Initializing the native per-game configuration.
*   **`DriverResolver.kt`**: A new utility class for managing GPU drivers specified in custom settings:
    *   Extracts the driver path from the custom settings INI content.
    *   Checks if the required driver exists locally.
    *   If not found locally, searches for the driver in predefined GitHub repositories (Mr. Purple Turnip, GameHub Adreno 8xx, KIMCHI Turnip, Weab-Chan Freedreno).
    *   Prompts the user to download and install the missing driver if found online.
    *   Handles automatic download and installation of drivers using `DriverViewModel`.
    *   Notifies the user if a required driver cannot be found or installed.
*   **`AndroidManifest.xml`**:
    *   Added a new intent filter for the action `dev.eden.eden_emulator.LAUNCH_WITH_CUSTOM_CONFIG` to `EmulationActivity`. This allows the app to respond to custom settings intents.
*   **`EmulationFragment.kt`**:
    *   Modified `onCreate` to detect and handle the new custom settings intent.
    *   If a custom settings intent is received:
        *   It uses `CustomSettingsHandler.applyCustomSettingsWithDriverCheck` to process the settings asynchronously. This allows for driver checks and user interaction (e.g., overwrite confirmation, driver installation).
        *   Displays appropriate error messages via `Toast` if custom settings processing fails (e.g., game not found, driver issues).
        *   The game is then launched with the applied custom settings.
    *   If a regular file intent or navigation arguments are used, the existing logic for loading game configurations (including custom per-game configs) is retained.
    *   Ensures that per-game configurations are correctly loaded or unloaded based on how the game is launched.
2025-07-23 09:58:31 +02:00
c77cf1d0e8 Add user feedback with Toast messages for custom settings and driver handling
All checks were successful
eden-license / license-header (pull_request) Successful in 33s
* Introduced Toast messages across `CustomSettingsHandler`, `DriverResolver`, and `EmulationFragment` to improve user interaction and feedback for key operations.
* Enhanced error handling and confirmation dialogs, including options to launch with default settings when custom settings fail.
2025-07-20 18:11:55 +02:00
3abc4ee7db refactor: extract and streamline EmuReady intent handling
All checks were successful
eden-license / license-header (pull_request) Successful in 19s
* Moved custom settings logic from `onCreate` to `handleEmuReadyIntent` for better readability.
* Added `showLaunchConfirmationDialog` to confirm game launch with or without custom settings.
* Updated `CustomSettingsHandler.findGameByTitleId` to show user feedback via `Toast`.
* Ensured improved separation of concerns and reusable methods.
2025-07-13 07:31:22 +02:00
3376e86e47 fix: suppress warning for predictive back gesture
* src/android/app/src/main/AndroidManifest.xml: Set targetApi to 33 and
  enable onBackInvokedCallback to support the Android 13 predictive back gesture.
  Also, add the tools namespace.
2025-07-12 21:11:34 +02:00
4ae2e31667 Merge branch 'master' of eden:eden-emu/eden into feat/android-emuready
All checks were successful
eden-license / license-header (pull_request) Successful in 15s
2025-07-12 20:48:53 +02:00
c03b93e1f0 fix: refactor EmulationFragment
All checks were successful
eden-license / license-header (pull_request) Successful in 21s
*handler callbacks using nullable Runnables
  * Remove unused `cpuBackend` and `gpuDriver` variables.
  * Use lambda syntax for `Slider.OnChangeListener`.
  * Remove unused imports.
2025-07-12 20:47:37 +02:00
4c66f6aceb fix: deprecating warning for getLayoutDirection and LAYOUT_DIRECTION_LTR 2025-07-12 20:46:33 +02:00
7fa40791c6 chore: removed unnecessary typecasting
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
2025-07-12 18:25:28 +02:00
eb720ef074 Support loading custom game settings via intent
This commit introduces the ability to launch games with custom configurations supplied via an Android intent. This allows external applications to provide specific settings for a game at launch time.

Key changes include:

*   **`CustomSettingsHandler.kt`**: A new class responsible for:
    *   Processing incoming intents with custom settings.
    *   Finding the target game in the user's library by its title ID.
    *   Writing the custom settings to a per-game INI file (`config/custom/<title_id>.ini`).
    *   Handling potential conflicts if a custom configuration already exists, prompting the user to overwrite or cancel.
    *   Integrating with `DriverResolver` to check for and handle required GPU drivers specified in the custom settings.
    *   Initializing the native per-game configuration.
*   **`DriverResolver.kt`**: A new utility class for managing GPU drivers specified in custom settings:
    *   Extracts the driver path from the custom settings INI content.
    *   Checks if the required driver exists locally.
    *   If not found locally, searches for the driver in predefined GitHub repositories (Mr. Purple Turnip, GameHub Adreno 8xx, KIMCHI Turnip, Weab-Chan Freedreno).
    *   Prompts the user to download and install the missing driver if found online.
    *   Handles automatic download and installation of drivers using `DriverViewModel`.
    *   Notifies the user if a required driver cannot be found or installed.
*   **`AndroidManifest.xml`**:
    *   Added a new intent filter for the action `dev.eden.eden_emulator.LAUNCH_WITH_CUSTOM_CONFIG` to `EmulationActivity`. This allows the app to respond to custom settings intents.
*   **`EmulationFragment.kt`**:
    *   Modified `onCreate` to detect and handle the new custom settings intent.
    *   If a custom settings intent is received:
        *   It uses `CustomSettingsHandler.applyCustomSettingsWithDriverCheck` to process the settings asynchronously. This allows for driver checks and user interaction (e.g., overwrite confirmation, driver installation).
        *   Displays appropriate error messages via `Toast` if custom settings processing fails (e.g., game not found, driver issues).
        *   The game is then launched with the applied custom settings.
    *   If a regular file intent or navigation arguments are used, the existing logic for loading game configurations (including custom per-game configs) is retained.
    *   Ensures that per-game configurations are correctly loaded or unloaded based on how the game is launched.
2025-07-12 13:02:48 +02:00