ANDROID PORT AND FIXES - #43
Open
nexus382 wants to merge 6 commits into
Open
Conversation
Android can now build as its own head project and run DreamPotato on device with the same shared MonoGame front end. This adds the Android activity, manifest, content packaging, native cimgui libs, app private storage setup, and the Debug APK path we have been testing. The port now has Android file picker flows for the VMU BIOS, opening vmu bin vms files, and Save As export. Desktop still keeps its normal native dialogs through platform services. The phone UI got the work it needed too. Touch input now feeds ImGui properly, the VMU overlay buttons are usable, Android menus are bigger for fingers, and desktop only actions like Open Data Folder and Set Window Size are hidden on Android. Fixed the stuff we hit while testing on the S25. Text was getting cut apart because ImGui draw commands were missing their vertex and index offsets. Slot 2 open close was also using desktop resize logic and breaking the Android backbuffer, so Android now keeps the device surface size clean. Validation done with Android build and install on the S25, Windows desktop build, and the test project. There are a few original XML doc warnings left alone and written up in the out of scope findings doc.
Owner
|
Test job failure is not surprising, I think there's some limitation which keeps it from working right across forks. I'll plan on checking out this PR when I have time, and just editing things till it's in a state I'm happy with. Thanks |
The Ubuntu jobs were doing a plain dotnet restore at the repo root, which made them pick up the new Android head project and fail because the android workload is not installed there. This scopes the Test job to DreamPotato.Tests and the Linux publish restore to DreamPotato.MonoGame with linux x64, so those jobs only prepare the projects they actually run. No app behavior changes here. This is just keeping Android workload requirements out of the desktop and test CI paths.
Author
|
the fix was because linux was trying to build android and it was being messy. simple fix pushing now |
Author
|
I think this is much closer to ready then it may have appeared. I have a lkot of sucess with tunnelling to android from pc, so when this gets merdged i can set that up too |
Owner
|
Sounds good. I am basically going to be going through all the code and potentially refactoring things until I understand everything and I’m happy with how everything works. |
…t-and-fixes' into Nexus/android-port-and-fixes
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
This brings DreamPotato over to Android, and fixes the rough spots we found while testing it on real hardware.
This is not just a project file tossed in and called done. The app now builds as an Android APK, launches on device, loads the real VMU BIOS from Android storage, keeps DreamLink on localhost, and has Android touch/UI work so it can actually be used with fingers.
Main changes
Added the Android head project for net9.0-android.
Added Android startup, activity wiring, manifest basics, content packaging, and native Android cimgui libs.
Added Android app-private storage setup for BIOS, saves, imported files, configs, screenshots, and save states.
Added Android file picker flows for first run BIOS import, opening vmu/bin/vms files, and Save As export.
Added platform services so desktop keeps using its normal native dialogs, while Android uses the Android document picker.
Hid desktop-only menu stuff on Android, like Open Data Folder and Set Window Size.
Added touch controls for the VMU buttons.
Made the Android menu bar bigger so its not miserable to tap with a finger.
Fixes from real phone testing
Fixed Android menu tapping so the top menu actually selects items correctly.
Fixed text getting chopped apart in menus and mapping screens. The real issue was the ImGui renderer not applying per-command vertex and index offsets.
Fixed Slot 2 open/close breaking the screen size on Android. That was desktop window resize logic touching the Android backbuffer, which is not ok on a phone.
Made BIOS import safer so a bad selected BIOS does not trash the existing valid one.
Added better Android picker failure handling, so it doesnt just silently hang if Android refuses a picker action.
Tested
Tested on a Samsung S25 Ultra.
Checked APK build, install, launch, real BIOS load, portrait and landscape, Slot 2 open and close, menu tapping, Gamepad Config text, and crash logs.
Also checked Windows desktop build still works, and the test project still passes.
Notes
There are a few original code warnings I did not touch becuase they are outside the Android port scope. I wrote those up in the out of scope findings doc so Rikki can decide what he wants to do with them.