Screen Size stuck at native resolution after new Android Studio Update.

I finally got around to finishing an update to my published game. However after the latest Android Studio update, when I go to test or build the .aab to test, the screen resolution is stuck at 816x624 centered in the middle of the screen. I have searched for hours looking for anyone that has a solution, and have had zero luck. I had a friend mention that the latest update was requiring the use of the WindowSizeClass. I have looked into this as well, even using ChatGPT, and haven't found a fix. Part of the update was to also adhere to Google's requiring apps to support API 33, which required me to update my project in Android Studio. I had used https://github.com/AltimitSystems/mv-android-client originally, but it makes it obsolete in Android Studio with tons of errors. I have tried using https://hackmd.io/@Mirai/RPGMakerMVMZ-Android_eng#◆-Step-1 instead, and everything now works, except for the issue related to the game not using the entire screen like it used to.

The first image is from my phone and the second is from my tablet. Before the update, the entire screen was used. I have the game set to 1280x720 in YEP_CoreEngine (version 1.32).

AltimitSystems hasn't been updated since 2019, and the other option by @Mirai works great except for the screen resolution issue I am having. Has anyone come across this or found a work around? Any help or suggestions would be much appreciated. If I posted this in the wrong location, please forgive me, I do not use forums very much.
The screen size in your android screenshot is NOT 816x624, it has the wrong aspect ratio for that.
And I knew from the first sentence in your description that it can't be on that screen size, because the number would have to come from somewhere.

what are the physical pixel numbers of your android phone?
we need to find out what size is truly displayed there before we can start to guess what is happening and how to solve it - there are several possibilities, but the most likely one is that the picture just isn't zoomed any longer.
The screen size in your android screenshot is NOT 816x624, it has the wrong aspect ratio for that.
And I knew from the first sentence in your description that it can't be on that screen size, because the number would have to come from somewhere.

what are the physical pixel numbers of your android phone?
we need to find out what size is truly displayed there before we can start to guess what is happening and how to solve it - there are several possibilities, but the most likely one is that the picture just isn't zoomed any longer.
Thanks for the reply Andar! I have a SG 21 FE 5G. The Galaxy S21 FE sports a 6.4-inch Dynamic OLED display. This display comes with full HDR support and a 120Hz refresh rate, as well as a steller pixel resolution (1080 x 2400 pixels), great pixel density (401 PPI), and an impressive screen-to-body ratio of 89.6%.

Okay that makes sense about no longer being zoomed in. I was pretty downhearted when I did the update and the screen size looks how it does now instead of using the entire screen like it did before.
OK, with those numbers I'm reasonably sure that the dispay is the set screen size of 1280x720 as that is roughly the visible part in the 2400x1080 display, as far as eyeballing goes.

which means there are several ways you can try to handle this.

1) making a pure mobile build where you change the internal game screen size to 2400x1056, although that means smaller sprites
(The engine has some side effects when using screen sizes that are not divisible by 48x48 pixel)

2) try to find settings in the android export that force the fullscreen zoom

3) combine 1 with a zoom plugin to make the sprites larger ingame.
OK, with those numbers I'm reasonably sure that the dispay is the set screen size of 1280x720 as that is roughly the visible part in the 2400x1080 display, as far as eyeballing goes.

which means there are several ways you can try to handle this.

1) making a pure mobile build where you change the internal game screen size to 2400x1056, although that means smaller sprites
(The engine has some side effects when using screen sizes that are not divisible by 48x48 pixel)

2) try to find settings in the android export that force the fullscreen zoom

3) combine 1 with a zoom plugin to make the sprites larger ingame.
Thank you for the information Andar. I have been playing around with your suggestions. I found that YEP_CoreEngine is the issue, I think. I deployed the project after changing the resolution to 2400x1056, and screen was larger, however it wasn't centered. It sort of hung off the edge of the screen a bit. I forgot to take a screen shot. Playing around with the setting in Android Studio with the AndroidManifest.xml and MainActivity.kt has yielded no results or changes. It seems to be dependent on YEP_CoreEngine. What do you think?
I don't think so - there should be nothing in the core engine that can affect such centering, because said centering should be handled by the display driver for the hardware itself. That is also where the changes were made after all.

Unfortunately THAT specific info isn't even available for PC drivers which their much better access structure, never talking about android...

Si if the suggestions I made above don't work out, then there is almost nothing left where I can help.
I don't think so - there should be nothing in the core engine that can affect such centering, because said centering should be handled by the display driver for the hardware itself. That is also where the changes were made after all.

Unfortunately THAT specific info isn't even available for PC drivers which their much better access structure, never talking about android...

Si if the suggestions I made above don't work out, then there is almost nothing left where I can help.
I finally got the screenshots. This is so whacky. Everything worked with no issues back when I used AltimitSystems to originally upload my game to the Play Store.

First screen shot is 816x624
Second is 1920x1080
Third is 2400x1056

It also throws off the windows as well lol. I'd have to config the TitleCommandPosition script file as well it looks like from screenshots 2 and 3. What method are people using as of 2023 to stay relevant with Google's API policies? I gave Cordova a try as well and didn't have much luck there either.

I truly appreciate your advice and suggestions Andar. Thanks!
I have resolved part of the issue, however another presents itself. Through my troubleshooting I have found the issue ultimately lies with YEP_CoreEngine. With the extensive help of ChatGPT, replacing this code at line 899 allows the game to work perfectly on tablets or anything with a 10inch+ screen. Anyone have thoughts on how I can fix this to make it work on devices with less than 10inch screens?
I am still troubleshooting with ChatGPT to find a fix. Thanks!

if (Utils.isMobileDevice()) {
var screenWidth = window.innerWidth;
var screenHeight = window.innerHeight;
var targetAspectRatio = Yanfly.Param.TargetAspectRatio || 16 / 9; // Default to 16:9

// Calculate the actual game height based on the target aspect ratio var gameHeight = Math.round(screenWidth / targetAspectRatio);

// If the calculated height is greater than the screen height, use screen height instead
if (gameHeight > screenHeight) {
gameHeight = screenHeight;
screenWidth = Math.round(gameHeight * targetAspectRatio);
}

SceneManager._screenWidth = screenWidth;
SceneManager._screenHeight = screenHeight;
SceneManager._boxWidth = screenWidth;
SceneManager._boxHeight = screenHeight; }
else {
SceneManager._screenWidth = Yanfly.Param.ScreenWidth;
SceneManager._screenHeight = Yanfly.Param.ScreenHeight;
SceneManager._boxWidth = Yanfly.Param.ScreenWidth;
SceneManager._boxHeight = Yanfly.Param.ScreenHeight; }
Um...what version of the Core Engine are you using?

Mine doesn't have any "target aspect ratio" parameter, so it looks like ChatGPT is just making up random plugin parameters that don't actually exist.

The next part doesn't look correct, either, as it's setting the height based on the width. I suspect that's why the math is wrong for some values. And that's definitely not the appropriate place in the code to put all the rest of the SceneManager stuff.

AI-generated code is rarely a good idea. It likes to make junk up too much.
Um...what version of the Core Engine are you using?

Mine doesn't have any "target aspect ratio" parameter, so it looks like ChatGPT is just making up random plugin parameters that don't actually exist.

The next part doesn't look correct, either, as it's setting the height based on the width. I suspect that's why the math is wrong for some values. And that's definitely not the appropriate place in the code to put all the rest of the SceneManager stuff.

AI-generated code is rarely a good idea. It likes to make junk up too much.
I have version 1.32 currently of the Core Engine. I didn't know that the AI did that. Before the latest update to Android Studio, my game would launch perfectly and utilize the entire screen of my Samsung Galaxy Tab S6 and my Note 10+ I had at the time when I first published it. With Google requiring the new API 33 and the recent update to Android Studio, it just centers everything in the middle of the screen and shrinks it down, as if the aspect ratio is off. I've spent a solid day trouble shooting it in Android Studio, with zero results. I then played around with the Core Engine, and now with the edit I made from my previous post, it loads perfectly with zero issues on anything with a screen size 10 inches or more, yet does not scale properly on a device with a screen smaller than 10 inches. I had the game set to 1280x720 in the original settings of Core Engine. My JS skills are beginner at best, and I have been slowly self teaching myself. I appreciate your reply ATT_Turan! If you have any suggestions or incite it would be most welcome. I spent a lot of time working on this project and would hate to have to remove it from the Play Store. Thanks!!
So first of all, are you sure it's actually 10 inches? That's what she said
Because, generally speaking, physical dimensions of a screen rarely play an important factor in how a game is rendered. It is the pixel count that is important.
You can have a 4k screen that is 5 inches tall, or a 480p screen that is 100 inches wide; doesn't matter, the 480p screen is still only 480p, and the 4k screen is still only 4k.

As for AI; please don't use AI in this way. AI is not a magic bullet that knows everything. It will be confident in its mistakes, and it will make a lot of mistakes. It is better to use AI for general purpose scenarios, not for getting specific answers to a problem.

I can't really assist you, since I don't develop for mobile, nor do I even play mobile games. But, I just wanted to give you some information that you should be considering.
So first of all, are you sure it's actually 10 inches? That's what she said
Because, generally speaking, physical dimensions of a screen rarely play an important factor in how a game is rendered. It is the pixel count that is important.
You can have a 4k screen that is 5 inches tall, or a 480p screen that is 100 inches wide; doesn't matter, the 480p screen is still only 480p, and the 4k screen is still only 4k.

As for AI; please don't use AI in this way. AI is not a magic bullet that knows everything. It will be confident in its mistakes, and it will make a lot of mistakes. It is better to use AI for general purpose scenarios, not for getting specific answers to a problem.

I can't really assist you, since I don't develop for mobile, nor do I even play mobile games. But, I just wanted to give you some information that you should be considering.
That's what she said, this had me in pieces LMAO! Thanks for that info TheAM-Dol. I have been attempting to figure this mess out. I try not to use the AI approach now. I read another post for another issue I was having and someone had mentioned AI for help. That particular issue was resolved using AskCodi so I assumed maybe it or ChatGPT could help with this.

Everything works perfectly with my Steam version. No issues. I just can't understand why updating the API level and the update to Android Studio broke my Google/Android version.

My tiles are the standard 48x48 and I have YEP_CoreEngine setting the width/height to 1280x720.
Are you saying that I need to maybe look at the DPI settings, min and max maybe?

Thank you for the reply!
I finally found a solution! In my index.html file I made this change.

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, viewport-fit=cover">

Thanks to everyone who replied and offered help, suggestions, and advice, it was much appreciated! :XP1:

Original thread: https://forums.rpgmakerweb.com/threads/screen-size-stuck-at-native-resolution-after-new-android-studio-update.162814/