Page 1 of 1

Android Port: In Mani Corp

Posted: Tue Jul 20, 2021 11:17 pm
by ceckak
Hi All,

I'm back with another go at an Android port of Exult. I shelved this 10 years ago when kids took over my free time, but now they're playing with Android tablets and I figured it was time to introduce them to Ultima :)

I currently have it working well enough to be playable, using the dpad virtual joystick from the ios port and a launcher that simplifies importing the Good Old Games files, digital music and mods. I still have a fairly long TODO list, but I think it's far enough along that it makes sense to start upstreaming patches. I'll work on getting them cleaned up and staged for a pull request next. Most of what I have is isolated in an android subdirectory, but there are a few areas I refactored other parts of the codebase that will merit closer review and/or discussion.

Ken

For historical context, the original port was discussed here: http://exult.info/forum/viewtopic.php?p=348367

Re: Android Port: In Mani Corp

Posted: Wed Jul 21, 2021 4:35 am
by ceckak
I haven't submitted a pull request yet, but I'm working through sanitizing my patch stack and will be posting the ones that are ready for discussion/review here:

https://github.com/ceckak/exult/commits/android-port

Re: Android Port: In Mani Corp

Posted: Wed Jul 21, 2021 8:18 am
by Dominus
As I wrote per email, I'm very excited for this and maybe it's time to have some Android development environment setup here :)

I wonder about your ogg/vorbis detection change https://github.com/ceckak/exult/commit/ ... ad0b26ef0b
You write that pkgconfig detection was commented out and you reverted it... but it's actually this commit that comments it out.

Re: Android Port: In Mani Corp

Posted: Wed Jul 21, 2021 1:39 pm
by ceckak
Woops - you're right! I was remembering a later patch where I uncommented it and didn't realize I had commented it out in the first place here. I've confirmed that they cancel out and removed this one from the series. Thanks for reviewing.

Re: Android Port: In Mani Corp

Posted: Fri Jul 23, 2021 12:31 am
by ceckak
I think I've got all the patches posted that are isolated to the exiting exult codebase and don't overlap with the java layer and related android build infrastructure. The rest of them will take a little longer as they need more extensive cleanup.

Re: Android Port: In Mani Corp

Posted: Sun Jul 25, 2021 12:29 pm
by Dominus
I'll probably have time to test your non Android changes on macOS and iOs later today.

I just committed a way to quickly show/hide the cursor on iOS. I'm curios how your Android port behaves when you use a real mouse with an Android device (is this even possible?).
I had to use several workarounds as SDL2 is buggy with a real mouse on iOS (see https://github.com/libsdl-org/SDL/issues/4482 https://github.com/libsdl-org/SDL/issues/4483 https://github.com/libsdl-org/SDL/issues/4486) so it would be nice to know whether a fingerdown event can differ between finger and mouse on Android. But it's nothing important yet :)

Edit: and an important change is the bool Mouse::use_touch_input = true; which you need to hide the cursor. For now it is only set for ifdef iphoneos in exult.cc but Android needs this, too, of course.

Re: Android Port: In Mani Corp

Posted: Sun Jul 25, 2021 2:38 pm
by ceckak
I'll probably have time to test your non Android changes on macOS and iOs later today.
Just pushed another update which fixes some build breakages that snuck in while I was cleaning up whitespace issues.
I just committed a way to quickly show/hide the cursor on iOS. I'm curios how your Android port behaves when you use a real mouse with an Android device (is this even possible?).
I had to use several workarounds as SDL2 is buggy with a real mouse on iOS (see https://github.com/libsdl-org/SDL/issues/4482 https://github.com/libsdl-org/SDL/issues/4483 https://github.com/libsdl-org/SDL/issues/4486) so it would be nice to know whether a fingerdown event can differ between finger and mouse on Android. But it's nothing important yet :)
I think I've got an adapter I can use to plug a mouse into the kids' tablet - will give it a try.
Edit: and an important change is the bool Mouse::use_touch_input = true; which you need to hide the cursor. For now it is only set for ifdef iphoneos in exult.cc but Android needs this, too, of course.
I've never seen exult run on ios, so I'm not sure what visual cues it has. I left the mouse cursor visible for now because I liked having the visual cue on the screen of a targeting cursor or combat cursor, but I agree that it's not ideal to have this confusing arrow pointing off in a random direction.

Re: Android Port: In Mani Corp

Posted: Sun Jul 25, 2021 6:47 pm
by Dominus
https://youtu.be/AtUS_I4UCuw <- Exult on iOS. It really does not need any visual cues, once everything works. The only thing exclusive to the iOS port is the virtual joystick and the ESC button (lower left). And of course the system keyboard that is enabled when needed but only then (cheat screen, notebook, save game screen, "start a new game" Avatar name).
And if someone feels adventurous it would be worthwhile to add the virtual joystick and ESC button *in* Exult instead of an overlay that is iOS specific. I found the ESC button a must, btw. To quickly dismiss things is really great!

Re: Android Port: In Mani Corp

Posted: Mon Jul 26, 2021 2:18 am
by ceckak
Thanks - the video really helps. I need to figure out how to turn on the shortcut icons at the top. That will eliminate the need for mouse visual cues. I already have the virtual joystick (showGamecontrols()) and text input (promptForName()) implemented, but was unclear about how showButtonControls() is used - makes sense now.

Incidentally, is there a reason we need a separate promptForName() when SDL's virtual keyboard input works everywhere else?

Re: Android Port: In Mani Corp

Posted: Mon Jul 26, 2021 5:44 am
by Dominus
the shortcutbar is a general Exult feature and made default for iOS in gamewin.cc:389 along with the item helper menu (it's useful for smaller screens, enable it and try it out by tapping *near* something) and default screen location of the virtual joystick (probably useful for Android as well, if you made it possible to have it to the left and right).
The InputOptions_gump is used for those settings and if you have any Android specific ones, add them there, I'd say.
(and I have to go over the gameplay options gump as I made many mouse options invisible that can now come back with real mouse support on iOS)

promptForName(): good question. The original porter did this for the player name and the savegame screen and I never thought about it.

Re: Android Port: In Mani Corp

Posted: Tue Jul 27, 2021 6:59 am
by Dominus
something broke on macOS with your commits, I'll bisect later which is at fault. It stalls at creating AudioMixer.

Re: Android Port: In Mani Corp

Posted: Tue Jul 27, 2021 1:37 pm
by ceckak
Thanks for testing it. It looks like you narrowed it down to https://github.com/ceckak/exult/commit/ ... 810ad4c13f. I had considered exposing this as a configurable option or ifdeffing it, which might work as a mitigation, but it would be good to chase down why it's causing a hang. I've added it to my TODO list to circle back on after I get through a first pass of cleanups and posting all the patches.

Re: Android Port: In Mani Corp

Posted: Tue Jul 27, 2021 5:56 pm
by Dominus
I really appreciate that you are doing this so thoroughly :)
Keeping everything contained in small commits really speeds up regression testing!
In this case I was sure the cause would be the abstract stream files or SDL_RWops changes, that it was this tiny little change surprised me :)

I've tested with iOS and there it worked fine. Though your SDL_RWops had me change quite a bit as suddenly expack got the SDL dependency, which meant the simple expack target in the Xcode project suddenly needed a lot of frameworks to compile. I'm not sure if I'm happy with that as it was nicer to have a little independent tool.

Re: Android Port: In Mani Corp

Posted: Wed Jul 28, 2021 4:22 am
by ceckak
Though your SDL_RWops had me change quite a bit as suddenly expack got the SDL dependency, which meant the simple expack target in the Xcode project suddenly needed a lot of frameworks to compile. I'm not sure if I'm happy with that as it was nicer to have a little independent tool.
I figured that one might be controversial. It's the only big/intrusive change out of the bunch. Everything else is small or isolated to android. I like the change because we get to leverage the SDL abstraction and pick up any work they've done to support platform data access. On android, this lets me access resources that have been embedded in the app, as well as handing odd paradigms about directory locations. I haven't verified, but I expect it has similar support on ios and would let us remove some ifdefs.

But I get your point about dragging a lot of baggage into little tools. Maybe we can find a way to rework things so that expack uses an ifstream-backed implementation instead of the SDL version...

Worst case, we can scrap the rwops stuff and I'll do similar ifdefs for android to what's been done for ios.

Re: Android Port: In Mani Corp

Posted: Wed Jul 28, 2021 5:15 am
by Dominus
Definitely need a second opinion on this.
I do think it's a good idea to use as much of SDL as possible but really dislike it for our tools (but it's not set in stone).
For iOS there is not much code needed as it doesn't need anything outside of the app bundle.

Re: Android Port: In Mani Corp

Posted: Thu Jul 29, 2021 9:57 am
by Dominus
Looked at promptForName() again.
The reason it is used for the savegames is to prevent the system keyboard obscuring where you want to write. It would work ok without it for entering a new savegame name or for editing the first half of the existing savegames. But the lower half would force you to write blindly.

The player name is mostly convenience when you use touch, I think. Touch -> prompt

Re: Android Port: In Mani Corp

Posted: Fri Jul 30, 2021 5:08 am
by ceckak
Ok - that makes sense. I guess the pop-up keyboards don't really contemplate fixed-location text input fields. I've got it implemented for android in any case.

Still wading through patch cleanups, but I got another batch uploaded which get up to the point of compiling the exult sources into the android apk, although it's still missing the subsequent Java layer that will launch Exult. For now, these just get you a bloated hello world app.

Re: Android Port: In Mani Corp

Posted: Sun Aug 01, 2021 5:00 am
by ceckak
Last of the patches are posted which brings the github tree up to date with my local development. Lots of loose ends to tie up still, but this should be playable.

Re: Android Port: In Mani Corp

Posted: Sun Aug 01, 2021 9:42 am
by Dominus
YAY! can you upload a binary? I'm on iOS but Marzo and Dr.Code (or anyone else on Android) might want to take it for a ride!

Re: Android Port: In Mani Corp

Posted: Mon Aug 02, 2021 4:48 am
by ceckak
Doing my due diligence (which I should have done sooner), I built an APK from the freshly-sanitized github sources and tested it out on my tablet. Came up great with graphics and sound, but mouse (touch) input seems to be completely broken. I must have goofed something up along the way when I was rearranging patches. Will review against my original dev tree to figure out what's missing, but might be a couple of days before I get it sorted out. I'll post a binary release on github as soon as I've got a working version.

Re: Android Port: In Mani Corp

Posted: Mon Aug 02, 2021 11:52 am
by Dominus
Great, thanks.
I have some ideas about your known issues/planned improvements, that I'll write down soonish :)

Re: Android Port: In Mani Corp

Posted: Mon Aug 02, 2021 12:26 pm
by Dominus
- Get native mac build working
What do you mean? Building the Android port on mac?

- Add UI tabs
what do you have in mind? something like :
- Add option for displaying console output in a UI tab

- Look into leveraging google's cloud savegame feature
Honestly, I'd think Dropbox would be nicer or at least along with Google Drive. This could maybe be expanded so you can store your games on Dropbox/Gdrive and add them from that. (For example I already have all the possible games (BG/SI with or without Addons and the localized games) on Dropbox and playing from these folders on my mac)

- Add shortcuts to dpad for combat and target
- Might not be needed with the shortcut icons
Yes, the shortcut bar takes care of this.

- Would be nice to have a shortcut for inventory too
When you click on the backpack in the shortcut bar the paperdolls open (starting with the Avatars but once that is open it opens the other party members' on the next clicks). I thought about whether it should open the backpack instead but since the item mamangement is more than the backpack, I thought it makes more sense to open the backpack

- Consider having the arrow move on the screen in sync with the dpad
- Or hide it like iOS does
Try it out without the cursor. With https://github.com/exult/exult/commit/b ... ebef754714 I added a quick way to switch from hiding to showing the cursor with the bool Mouse::use_touch_input (see exult.cc:703 where I enable this for iOS). Once you eliminate the cursor suddenly touch input makes much more sense and even feels natural.

- Revisit whether dpad is the best way to control movement
- Could use multi-touch to simulate RMB
I put a lot of thought into it but on a real device multi touch just didn't feel right to control the party. On a phone the screen is too small, on a proper tablet the device is too heavy/unwieldly for it to make it work nicely. Though the dpad location could maybe move up to the middle of the side on tablets to make it more comfortable to holde it while playing.

- Still seems unreasonably sluggish; look into performance
have you upped the FPS (in gameplay options)? it may just need to be set to 10
lowering the audio sample rate might help along with the point scaler.

- iOS port has another UI element (escape button?); find out if it is necessary
Again, try it. It really makes sense to quickly dismiss gumps or quickly open the options gump.

- Find out how to open journal without a 'j' key
Journal? The notebook is also in the shortcut bar. J is not the default for it as this opens the jawbone in SI (also in the shortcut bar)

- Come up with a shortcut to quicksave/load
Maybe this could go to the shortcut bar as well - single click save, double click load. BUt I'm not 100% sure about whether I'd want that on a touch device. To easy to use by accident.
Maybe to icons on the shortcut bar, that only activate on double click?

Re: Android Port: In Mani Corp

Posted: Tue Aug 03, 2021 3:54 am
by ceckak
Thanks for going through those in detail. As you've noted, a number of them address things we've already discussed and I haven't circled back to update them. Plan is to get the shortcut icons turned on and mouse hidden, which will address a number of items on the list.
- Get native mac build working
What do you mean? Building the Android port on mac?
That was poorly worded, but yes - that's what I meant. Trying to build with `--enable-android-apk` fails on a mac currently and I need to troubleshoot. I've been doing the android builds from a linux host. I also haven't tried to build the apk on windows.
- Add UI tabs
what do you have in mind? something like :
- Add option for displaying console output in a UI tab
Yes - I think this was referring to the lanucher UI. Currently, it just has some checkboxes and a button, but I'd like to split it up into multiple pages with the launch button on the primary page/tab, a second page for installing content, and a 3rd for viewing the console output. There might be a case for another page with options that are specific to android and are useful to access before launching the game, although I'm reluctant to get into a parallel set of configuration options that fall outside of the existing Exult configuration system.
- Look into leveraging google's cloud savegame feature
Honestly, I'd think Dropbox would be nicer or at least along with Google Drive. This could maybe be expanded so you can store your games on Dropbox/Gdrive and add them from that. (For example I already have all the possible games (BG/SI with or without Addons and the localized games) on Dropbox and playing from these folders on my mac)
Good ideas. I haven't put much thought/investigation into this yet; I just happened to stumble across google's offering for save games. But I like going with something that will be more cross-platform. The primary goal here is to provide an easy way to share save games between platforms and/or ensure that they are backed up so you don't lose them when your device breaks. At the moment, I save games with the app, so you end up losing them if you uninstall the app. In the near term, it would probably be better to save them in a Documents folder that outlives the app.
- Revisit whether dpad is the best way to control movement
- Could use multi-touch to simulate RMB
I put a lot of thought into it but on a real device multi touch just didn't feel right to control the party. On a phone the screen is too small, on a proper tablet the device is too heavy/unwieldly for it to make it work nicely. Though the dpad location could maybe move up to the middle of the side on tablets to make it more comfortable to holde it while playing.
I noted that early on, but I'm pretty pleased with the dpad setup so far. Or rather, I've been watching my daughter play it and it seems to be working well for her :)
- Find out how to open journal without a 'j' key
Journal? The notebook is also in the shortcut bar. J is not the default for it as this opens the jawbone in SI (also in the shortcut bar)
Yeah - notebook is what I meant - got mixed up on name/letter. As I noted above, it sounds like the shortcut bar will address this.
- Come up with a shortcut to quicksave/load
Maybe this could go to the shortcut bar as well - single click save, double click load. BUt I'm not 100% sure about whether I'd want that on a touch device. To easy to use by accident.
Maybe to icons on the shortcut bar, that only activate on double click?
This one may not be as big a deal as I think of it being. I still live with scars from the original game frequently crashing and a compulsive need to quicksave every time anything significant happened. Calling it "quick" was generous - I remember those saves took *forever*.

Re: Android Port: In Mani Corp

Posted: Tue Aug 03, 2021 5:31 am
by ceckak
Looks like the mouse problems were triggered when I rebased to pull in your recent changes to support physical mice. I haven't root caused yet, but in the interest of getting a working preview uploaded, I moved my tree back before those changes and have a working binary uploaded here.

Re: Android Port: In Mani Corp

Posted: Tue Aug 03, 2021 9:28 am
by Dominus
Ah, probably that hint is messing things up: https://github.com/exult/exult/commit/b ... af90691R54
As you have likely not set the bool Mouse::use_touch_input to true for Android, this hint sets SDL to use a real mouse rather than touch input. So this screws everything up. Not to mention that the hint might not even be needed for Android. SDL messed something up there, as a real mouse device only works correctly when this hint is set and that is NOT what that hint should do.
So if you revisit this you need to set the Mouse::use_touch_input to true and see how touch feels without the cursor being shown and whether you need to even set the hint if a real mouse device is attached.

Re: Android Port: In Mani Corp

Posted: Wed Aug 04, 2021 4:12 am
by ceckak
Yep - that was it. I've rebased and added a new patch to enable the use_touch_input flag and confirmed that the mouse works (and the cursor is now hidden).

Re: Android Port: In Mani Corp

Posted: Sat Aug 07, 2021 4:43 am
by ceckak
I've tested with iOS and there it worked fine. Though your SDL_RWops had me change quite a bit as suddenly expack got the SDL dependency, which meant the simple expack target in the Xcode project suddenly needed a lot of frameworks to compile. I'm not sure if I'm happy with that as it was nicer to have a little independent tool.
Fixed (I hope). I've reworked the code in utils.cc so that it defaults to using ifstream/ofstream, but has an option to inject an alternate implementation. Then in exult.cc, I inject the SDL_RWops versions. That way the dependency on SDL only shows up in the main game engine, while the standalone utilities remain free of it.

Re: Android Port: In Mani Corp

Posted: Sat Aug 14, 2021 8:28 pm
by Dominus
I advertised your port in the UDIC facebook group ;)
And I noticed that you are using the "old" virtual joystick. The new one is just the "knob"(?) (as you can see in the video) and while it snaps back to the default position, it is not constrained in the directions you can pull it. Which helps in fine tuning walking, medium running, full running.
And a new release with the hidden joystick would be great ;)

Re: Android Port: In Mani Corp

Posted: Sun Aug 15, 2021 1:15 pm
by Annorax
I'm very excited to see work again on Android. I gave this a try and it is really great. I've gone from Trinsic to Paws to Britain without any major issues. I have the following feedback/suggestions.

1.) Please consider full support for a controller. As of now my controller's left thumbstick controls the party movement but no other buttons do anything and I don't see a way to map them. Please make this fully customizable - I think left thumbstick for movement, right thumbstick for cursor movement, one of the face buttons for action (open doors, etc...) and then other buttons mapped per player's choice. After about 30 minutes my wrist is cramping up. :)

2.) I have a Samsung Galaxy S5e tablet and while not high end, isn't slow and the game, especially in the starting menu, does feel a little sluggish though is very playable. I do have FPS set to 10.

3.) For the action menu up top, is there any way to separate it from the game? I know there are outlines of colors you can chose but I keep looking up and seeing a backpack on the ground that's not real. :)

Re: Android Port: In Mani Corp

Posted: Sun Aug 15, 2021 4:23 pm
by Dominus
1. it's not yet possible and needs to be done in Exult (Marzo had a look a while ago but wanted to clean things up first)
3. other than the outlines not much to be done unless redrawing those controls completely differently. But isn't setting the shortcut bar to transparent *and* giving it a green outline enough to make it very clear?

Re: Android Port: In Mani Corp

Posted: Sun Aug 15, 2021 7:59 pm
by ceckak
Regarding #2 (performance) - the apk I posted is a debug build, which might be slowing thongs down. I'm working on a release build and will post a new app as soon as I can figure out how 5o sign it correctly.

Re: Android Port: In Mani Corp

Posted: Sun Aug 15, 2021 8:01 pm
by ceckak
Regarding old/new joystick - will add that to my to-do list.

Re: Android Port: In Mani Corp

Posted: Fri Aug 20, 2021 5:50 am
by ceckak
Got a release build posted. This substantially improved performance. Also has other minor updates to better align with the iOS experience.

Re: Android Port: In Mani Corp

Posted: Fri Aug 20, 2021 1:57 pm
by Annorax
Thank you for the update. It is noticeably faster in the menus. One oddity is that I could not install over the previous version, it kept throwing an error. I had to uninstall and reinstall. Please let me know when full controller support is available. :) I'd be more than willing to help QA that and any other new features.

Re: Android Port: In Mani Corp

Posted: Fri Aug 20, 2021 5:13 pm
by ceckak
Annorax wrote:
Fri Aug 20, 2021 1:57 pm
One oddity is that I could not install over the previous version, it kept throwing an error. I had to uninstall and reinstall.
Good point - I'll have to add a warning about that in the release description. This is happening because the release binary is signed, and android won't let you replace an existing install with a new install if they are not signed by the same key. Hopefully this won't be an issue going forward as long as I stick to release binaries signed with the same key. The only way around it that I know of is exactly what you did - deinstall and reinstall. Which is currently painful because it nukes your settings, installed content, and savegames.

Re: Android Port: In Mani Corp

Posted: Wed Oct 06, 2021 4:27 pm
by Dominus
Just tried it on the Android Studio emulator :)
Works nicely and the way to install the games and the other stuff is great!

What I noticed, though:
- I really miss the Esc button to quickly dismiss gumps (and call the settings gump)
- the cheat screen and notebook need to use the iOS stuff. The cheat screen is then made to display everything in the top half of the screen, so the onscreen keyboard hides as few as possible. The notebook is also higher up on the screen. Maybe search for every ifdef iphoneos in the code and see if that makes sense for Android. Mostly it does, I think.
- the joypad and the toolbar should be enabled by default (but I think you might have already done that, just not in the snapshot?)

Edit: oh, and having the mt32 emulation working, too would be great! (mt32emu lib)

Re: Android Port: In Mani Corp

Posted: Fri Oct 08, 2021 8:15 pm
by ceckak
I'll check on those and make sure they're captured on the TODO list, and get your patch merged to add some of the missing ifdefs. Recently I've been trying address some issues with the launcher UI, and probably will look at relocating the savegames next so that they don't get deleted when you uninstall the app. I don't normally work with Java/Android, so it takes me a while to muddle through some of this.

Re: Android Port: In Mani Corp

Posted: Sun Feb 27, 2022 9:29 pm
by SGun
I think I have an issue with the new launcher : on the launcher tab, I cannot find the Launch Exult button and the checkbox to autolaunch, I think they might be pushed beyond the screen by the Exult logo.

I also wanted to thank you for the wonderful job, I played The Black Gate to the end last summer without any major issues, I was amazed at how easy it was to play on the phone. Few (minor) issues I ran into :
- I used the telescope in Moonglow and couldn't find any way to go back to the game, I had to kil it and reload
- A few crashes on the launcher, but I just had to restart the app and everything was fine
- Rings are quite hard to catch (guess there is no miracle with such a small screen and large fingers :D ), disabling the SI paperdolls was actually quite helpful

Thanks again !

Re: Android Port: In Mani Corp

Posted: Tue Mar 01, 2022 9:07 am
by Dominus
The telescope is fixed in Exult master code for iOS, so by extension for the Android port as well. I hope some other developer of Exult can look through the changes and soon greenlight a merge!

Re: Android Port: In Mani Corp

Posted: Tue Mar 29, 2022 5:02 am
by ceckak
Haven't been keeping up with the forums here on a regular basis, but I am still chipping away at the android port and am getting close to closing out the loose ends to a point where I'll be ready to start engaging more with pull requests.

The telescope issue should indeed be fixed now. My kids ran into it before the iOS fix and we had to plug a keyboard into the tablet to get out of it. You should be able to use the onscreen escape button now.

There were also a couple of problems with restarting the game and autolaunch not working reliably that should be fixed now.

Not sure what the issue is with the scaling and the button getting pushed off the bottom, I'll make a note to do some testing on different screen sizes to see if I can tweak something in the layout.

Fill disclosure: I have zero professional background in android development and am improvising wildly :)

Re: Android Port: In Mani Corp

Posted: Fri Apr 01, 2022 4:48 am
by ceckak
Posted a new release with changes to the launcher tab so that you should be able to see the button/checkbox on small screens now. Also adds mt32emu support.

Last thing I need to do is add missing copyright headers to the new source files, and then I think I'll be ready for a pull request.

Re: Android Port: In Mani Corp

Posted: Thu Jun 30, 2022 9:18 pm
by hooby3dfx
I am getting a crash on Android with the latest release Exult for Android Snapshot 2022-05-03 after attempting to select the game .pkg file:


FATAL EXCEPTION: main
Process: info.exult, PID: 8342
java.lang.RuntimeException: Unable to start activity ComponentInfo{info.exult/info.exult.ExultLauncherActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment info.exult.GamesFragment: could not find Fragment constructor
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3707)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864)
at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5811)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5703)
at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:71)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7870)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment info.exult.GamesFragment: could not find Fragment constructor
at androidx.fragment.app.Fragment.instantiate(Fragment.java:628)
at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57)
at androidx.fragment.app.FragmentManager$3.instantiate(FragmentManager.java:483)
at androidx.fragment.app.FragmentStateManager.<init>(FragmentStateManager.java:85)
at androidx.fragment.app.FragmentManager.restoreSaveState(FragmentManager.java:2728)
at androidx.fragment.app.FragmentController.restoreSaveState(FragmentController.java:198)
at androidx.fragment.app.FragmentActivity$2.onContextAvailable(FragmentActivity.java:149)
at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.java:99)
at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:322)
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:273)
at androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:115)
at info.exult.ExultLauncherActivity.onCreate(ExultLauncherActivity.java:69)
at android.app.Activity.performCreate(Activity.java:8057)
at android.app.Activity.performCreate(Activity.java:8037)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3688)
... 15 more
Caused by: java.lang.NoSuchMethodException: info.exult.GamesFragment.<init> []
at java.lang.Class.getConstructor0(Class.java:2363)
at java.lang.Class.getConstructor(Class.java:1759)
at androidx.fragment.app.Fragment.instantiate(Fragment.java:613)
... 30 more

Re: Android Port: In Mani Corp

Posted: Sun Jul 03, 2022 9:52 pm
by ceckak
Hi @hooby3dfx - Can you let me know what device you are using and what Android version it is running?

Re: Android Port: In Mani Corp

Posted: Wed Jul 06, 2022 3:11 pm
by hooby3dfx
Pixel 6 with Android 12

Re: Android Port: In Mani Corp

Posted: Thu Jul 07, 2022 3:21 am
by ceckak
That's a handy coincidence as I also have a Pixel 6, but it's not crashing for me. Maybe something related to a carrier-locked version? In any case, it's not a simple android version compatibility issue. I'll do some rummaging around and see if I can come up with any theories based on your backtrace.