Screen size and density
Android devices come in a vast array of different screen sizes and screen densities. This makes it tricky to say “this app should only be available to phones” on the Google Play store.
Here is the most concise way I can find to achieve the desired result. Include the
<compatible-screens> element in the
AndroidManifest.xml file like this (my original gist here):
480 vs xxhdpi
android:screenDensity="480" can also be written as
android:screenDensity="xxhdpi" but depending on the min SDK version you are targeting, the
xxhdpi may be unrecognised and cause a build failure. Fortunately,
480 has the same result because the standard quantised dpi for
xxhdpi is 480.
xxxhdpi in the Android source but I’ve not seen a phone with the capability yet. I imagine this will have a standard quantised dpi of 640, so you will able to use this similar trick in future.
Now all you have to do is create the 100s of assets you need to actually support these screen densities.
What’s next? CastlemaineHDPI? (XXXX).