[Solved] Black bars on Samsung Galaxy S9+

Anything libgdx related goes here!

[Solved] Black bars on Samsung Galaxy S9+

Postby obigu » Mon Nov 12, 2018 1:23 pm

I've received a report from a user that my game displays with black bars on his S9+ (has included screenshot).

The game displays full screen on a Google Pixel 3 (which has 18:9 aspect ratio) and according to the Android docs, as long as it targets API 24+ there's no need to add anything to the Android Manifest (as resizeActivity defaults to true).

It's the only report I've received about it and I want to confirm he has not messed with some settings on his device.

Does any charitable soul who owns a Samsung S8, S9 or S9+ could test my game (https://play.google.com/store/apps/deta ... rick&hl=en) and let me know if it shows black bars?

Thanks!!!

UPDATE: This may be an issue that affects not only my game but all libGDX games. I've remembered that Google Play Prelaunch reports include screenshots and have confirmed that some devices with screen ratios higher than 16:9 (not only Samsung, LG G6 aswell) also show Black Bars which shows it's not a problem on the user that has reported the issue but a more genereal one. I've then asked this user to try to run a libGDX game not developed by me that I know it displays properly on the Pixel 3 or iPhoneX and he has confirmed it Also has black bars. It'd be great if any dev with a Samsung device could confirm this and if this happens to their apps

UPDATE 2
SOLUTION:
Thank you Samsung for ignoring the Android specs.
Unless this is added to the manifest:
Code: Select all
<meta-data android:name="android.max_aspect" android:value="2.1" />

Being 2.1 the max aspect ratio (can be higher) Samsung devices will display 16:9 no matter what.
Last edited by obigu on Tue Nov 13, 2018 3:22 am, edited 4 times in total.
obigu
 
Posts: 108
Joined: Fri Aug 02, 2013 4:47 pm

Re: Black bars on Samsung Galaxy S9+

Postby QuiIIraven » Mon Nov 12, 2018 1:49 pm

my samsung s8 has a 18,5:9 aspect ratio which would be different by ,5 from your aspect ratio and would explain the black bars if you have a fitviewport for example.

which view port do you use? what exactly do you mean with black bars? is your clear color black?
QuiIIraven
 
Posts: 19
Joined: Sat Jun 02, 2018 4:59 pm

Re: Black bars on Samsung Galaxy S9+

Postby obigu » Mon Nov 12, 2018 1:57 pm

The screenshot he has sent me is displaying the game 16:9 and the rest are black bars (both top and bottom). I have a custom Viewport but it adapts to any resolution and my background color is not black (kinda purple).

Could you please try my game on your S8 device and confirm if you see them?
obigu
 
Posts: 108
Joined: Fri Aug 02, 2013 4:47 pm

Re: Black bars on Samsung Galaxy S9+

Postby QuiIIraven » Mon Nov 12, 2018 5:50 pm

i have the black bars as well but I assume that when you run it on your desktop and play around with the window dimensions you will get a similar effect?
QuiIIraven
 
Posts: 19
Joined: Sat Jun 02, 2018 4:59 pm

Re: Black bars on Samsung Galaxy S9+

Postby obigu » Mon Nov 12, 2018 6:02 pm

QuiIIraven wrote:i have the black bars as well but I assume that when you run it on your desktop and play around with the window dimensions you will get a similar effect?


No,it works perfectly on iPhone X, Pixel 3 and any resize done on Desktop.

Edit: Do you develop games? Do your games use the whole screen? If yes, can you share your manifest?
obigu
 
Posts: 108
Joined: Fri Aug 02, 2013 4:47 pm

Re: Black bars on Samsung Galaxy S9+

Postby QuiIIraven » Mon Nov 12, 2018 8:57 pm

no sorry I am just a hobby game developer and used a fitviewport for my projects which comes with these bars.
the bars have the clear color if i remember correctly that is why i was asking (edit: I was wrong. they seem to be always black)

but anyway if you resize on desktop to the problematic resolution and you do not have the issue there then i am running out of ideas, sorry.

for more ideas i would need to know how your custom view port was implemented. i believe the issue is there because I assume that when you change to stretch view port for example the entire screen is used?

but again, I am no expert and don't know your viewport implementation.
QuiIIraven
 
Posts: 19
Joined: Sat Jun 02, 2018 4:59 pm

Re: Black bars on Samsung Galaxy S9+

Postby obigu » Mon Nov 12, 2018 10:00 pm

Well, I don't own a Samsung device with 18:9+ aspect ratio so my capacity to test is limited, that's why I'm looking for somebody with one that is able to test.

I've updated my main post with some new info, I believe the issue is not specific to my game.

If you use a StretchViewport in your game, do you see black bars on your S8?
obigu
 
Posts: 108
Joined: Fri Aug 02, 2013 4:47 pm

Re: [Solved] Black bars on Samsung Galaxy S9+

Postby hoangtunho2611 » Thu Nov 15, 2018 7:43 am

I have met so many times on the samsung phones screen ratio 16: 9 with my game.
And I have not figured out the solution to it. Thank you.

Reference from android developer:
https://developer.android.com/guide/pra ... stribution
hoangtunho2611
 
Posts: 24
Joined: Mon Mar 13, 2017 8:57 am

Re: [Solved] Black bars on Samsung Galaxy S9+

Postby slebed » Thu Nov 15, 2018 9:30 pm

I just installed your game on my Samsung S8 and there are no black bars. The game plays full screen just fine.
slebed
 
Posts: 220
Joined: Fri Dec 28, 2012 3:29 am

Re: [Solved] Black bars on Samsung Galaxy S9+

Postby obigu » Thu Nov 15, 2018 11:02 pm

slebed wrote:I just installed your game on my Samsung S8 and there are no black bars. The game plays full screen just fine.


Thank you, I pushed an update with the fix :)
obigu
 
Posts: 108
Joined: Fri Aug 02, 2013 4:47 pm


Return to Libgdx

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest