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

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

Added a way to launch games using an intent.

Slight redesign

Added a way to launch games using an intent. Slight redesign
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.
chore: removed unnecessary typecasting
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
7fa40791c6
fix: refactor EmulationFragment
All checks were successful
eden-license / license-header (pull_request) Successful in 21s
c03b93e1f0
*handler callbacks using nullable Runnables
  * Remove unused `cpuBackend` and `gpuDriver` variables.
  * Use lambda syntax for `Slider.OnChangeListener`.
  * Remove unused imports.
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
4ae2e31667
* 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.
refactor: extract and streamline EmuReady intent handling
All checks were successful
eden-license / license-header (pull_request) Successful in 19s
3abc4ee7db
* 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.
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
c77cf1d0e8
* 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.
crueter force-pushed feat/android-emuready from c77cf1d0e8
All checks were successful
eden-license / license-header (pull_request) Successful in 33s
to 67d7a3343b
All checks were successful
eden-license / license-header (pull_request) Successful in 22s
2025-07-20 18:55:35 +02:00
Compare
crueter force-pushed feat/android-emuready from 67d7a3343b
All checks were successful
eden-license / license-header (pull_request) Successful in 22s
to d76218baa1
All checks were successful
eden-license / license-header (pull_request) Successful in 29s
2025-07-23 09:58:33 +02:00
Compare
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.
chore: removed unnecessary typecasting
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
7fa40791c6
fix: refactor EmulationFragment
All checks were successful
eden-license / license-header (pull_request) Successful in 21s
c03b93e1f0
*handler callbacks using nullable Runnables
  * Remove unused `cpuBackend` and `gpuDriver` variables.
  * Use lambda syntax for `Slider.OnChangeListener`.
  * Remove unused imports.
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
4ae2e31667
* 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.
refactor: extract and streamline EmuReady intent handling
All checks were successful
eden-license / license-header (pull_request) Successful in 19s
3abc4ee7db
* 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.
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
c77cf1d0e8
* 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.
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
e3acf3051c
* src/android/app/src/main/res/values-zh-rTW/strings.xml: Remove extra 'string' from shader backend options.
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.
- Deleted `DriverResolver`
- Moved and streamlined driver path extraction logic into `CustomSettingsHandler`.
- Improved string resource usage and ensured consistent formatting across dialogs.
refactor: wip, trying to fix intent launching
All checks were successful
eden-license / license-header (pull_request) Successful in 29s
2c4d5f7a81
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
245408ccf0
Producdevity changed title from WIP: [android]: emuready launch intent to [android]: (feat) emuready launch intent 2025-07-30 14:39:02 +02:00
Producdevity changed title from [android]: (feat) emuready launch intent to [android]: (feat) emuready launch intent + redesign 2025-07-30 14:39:17 +02:00
fix: add missing SDL submodule
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
97cadb4e7c
chore: Remove unnecessary SDL submodule entry
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
64e8e962c2
fix: remove SDL submodule as it's now handled by CPM
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
840aae1671
fix: reset submodules to match master and remove ffmpeg submodule
All checks were successful
eden-license / license-header (pull_request) Successful in 34s
6f31a10699
fix: remove SDL directory as it's now handled by CPM
All checks were successful
eden-license / license-header (pull_request) Successful in 36s
7136733575
fix: restore files to match master state after problematic merge
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
780e008f1a
Producdevity closed this pull request 2025-07-30 17:13:47 +02:00
All checks were successful
eden-license / license-header (pull_request) Successful in 32s
Required
Details

Pull request closed

Sign in to join this conversation.
No description provided.