-1

Based on this dashboard https://developer.android.com/about/dashboards/: 92% of Android devices are "Normal size with hdpi-xxhdpi density"

Unfortunately that info does not help to understand what the approximate resolution of those devices. As I was digging through different sites to understand the concept of screen size and density I have found following concept:

normal screens are at least 470dp x 320dp

large screens are at least 640dp x 480dp

xlarge screens are at least 960dp x 720dp

As xxxhdpi refers to x4 scale I expect something like:

Normal screen with xxhdpi density will be < 1880x1280 pixels (typical 1920x1080?)

Large screen with xxhdpi density will be < 2560x1920 pixels (typical 2560x1440)

But then I found this table -https://material.io/tools/devices/

And it does not fit at all. For example:

  • Samsung Galaxy Note 4 - 5,7" 1440x2560 (515dpi) - xxhdpi (x3)
  • Nexus 6P - 5,7" 1440x2560 (515dpi) - xxxhdpi (x3.5)

As you can see, devices with identical screens goes to different buckets.

Can anyone tell what is wrong with my assumptions?

The reason I need this is because I developed a game for Android and I want to optimize it. My reference resolution for art is 2732 x 2048 (the largest for mobile devices). I want to build separate APK for usual 1920x1080 and lower resolution, so it will save disk space and RAM on user device.

dandepeched
  • 424
  • 5
  • 20
  • Given the documentation available: https://developer.android.com/guide/practices/screens_support about how Android handles screen size & density, why are you trying to find actual device resolution? If you are confused about same screen different density bucket, device manufacturer chooses. See: [Putting screen densities into the correct bucket](https://stackoverflow.com/q/33739945/295004) – Morrison Chang Feb 16 '19 at 05:46

1 Answers1

0

While building android apps, it's important to know the DPI (Dots Per Inch) value, but in case you are not sure about the mobile device the user is using, the dpi may vary and hence, the concept of PPI (Pixel Per Inch) comes into play. The problem with your assumption is that while considering PPI and DPI, always leave DPI and select PPI cause it will give you an accurate result. Both the phones have a different PPI and hence, the xxxhdpi goes up in case of Nexus6P as compared to xxhdpi Note 4

XXXHDPI= Extra Extra Extra High Dots Per square inch.

XXHDPI= Extra Extra High Dots Per Square inch.

Note that one 'extra' in their full form.

drawable-xxhdpi, 480 PPI (3 x 160 PPI)
drawable-xxxhdpi, 640 PPI (4 x 160 PPI)

As you can see the PPI varies and hence, Nexus 6P has PPI somewhere between that range.

Sukrut Shishupal
  • 138
  • 1
  • 12
  • Ok, now I confused even more :) For me PPI and DPI means the same - amount of pixels physically possible to display by dedicated screen. So maybe I'll explain what's bothering me. I developed a game for Android and I want to optimize it. My reference resolution for art is 2732 x 2048 (the largest for mobile devices). I want to build separate APK for usual 1920x1080 and lower resolution, so it will save disk space and RAM on user device. But it seems I will not be able to limit this by xxhdpi settings in manifest... – dandepeched Feb 16 '19 at 07:01
  • You're telling me the resolution of the screen. First, calculate the PPI for that screen, it can be done by using the formula: PPI= (square root of x^2 and y^2)/size of the screen). While writing the code, set this PPI to the calculated one and the programme will work. For bigger screen, PPI will be higher while for smaller screen, PPI will be lower. – Sukrut Shishupal Feb 16 '19 at 07:13