DeviceMetrics reporting lower resolution than actual pixels

Our application has a custom view that needs to know the true screen width. Up until Android 11 we had no issues, but on new Samsungs specifically running Anbdroid 11 we’re seeing a problem where DeviceMetrics is reporting a lower resolution than the actual device pixels. An example is S10 Lite is 1080 pixels wide, but DeviceMetrics is reporting 810 pixels.
I believe this must be some low res mode that is kicking in by the OS, but I don’t know why this has suddenly happened.
How do I convince the OS to report back the full screenwidth? Some special manifest attribute, or use of certain APIs? (I’ve tried defining ‘supports-screens’ which is a bit old-school, but that didn’t seem to help)
Thanks very much.

Some further information - other apps are also having the same problem:

And another, mentioning the same:

We’ve seen this on S10 Lite, and customers have reported it on Note 20 Ultra 5G, S20 FE, S20 5G - with all devices running Android 11.

Advice would be greatly appreciated.

Did you face the issue only with Samsung Devices? Did you check with other devices like pixel?

Hello SNS, We only have a Samsung with Android 11 - no Pixels unfortunately.

Since posting, I have supplied Samsung support directly with two Android Studio projects - one that works, one that doesn’t. Both have identical code and resources, but they have different project files (one is a brand new project - that works, one is an older project file several years old - that fails).

The only hint that something is wrong is that the failing app is recognised as a game (how, I do not know), and I can see the GameBooster controls added on the bottom navigation/tool bar.

I will report back when I have more detail back from Samsung support.

Hi richtea,
Did you report this issue here already?

I did, yes - to Developer support.
No detailed reply back yet. I think they’re still investigating.

An update:
I’ve been told by Samsung that this will be fixed in an OS update in the next 1-2 months.

  • last 4 character of the software version will be EUBA or EUB9

Kudos to Samsung for listening!