Im developing a Android Game, and to adjust my camera, i need to check the size of the screen of my user, the actual inch of the display, and not the resolution. Because there are devices with the same display size and different resolutions.
In Android development this is fixed using the DP unit.
Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion.
asked Jan 03 '11 at 12:52 AM
I asked this question a while back for iOS: http://answers.unity3d.com/questions/23490/is-there-a-way-to-detect-a-retina-display
Currently (as of Unity 3.1) there does not seem to be a way to do it- the iOS workaround is simply to enumerate known devices that have a retina display.
I do not have access to the Android version though, and given the proliferation of Android devices I would expect such a setting to be even more important So perhaps there's a solution for Android I don't know about.
answered Jan 03 '11 at 02:18 AM
I've ot the same trouble, i'll try to make a direct call to android api.
I'll post the solution here if i find it
answered Sep 27 '11 at 03:28 PM