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:
https://answers.microsoft.com/en-us/xbox/forum/all/game-pass-issue-android-11-visual-issue-with/21fb89de-c081-4a19-842f-61e2584d8019

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.

Hi,
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.