If you need accuracy, there's really no other option than to have the
user calibrate the device.  I've seen the same problem on Nokia phones
-- the N97 and N97mini have (nearly) the exact same OS & features, &
so report the same screen size.  But the mini is about 10% smaller.
In the wild and woolly Android market it will be even worse.

What I'd do is have the user place on the screen a coin of known size
(let them pick between US quarter and Euro coin, eg), and provide 4
buttons to increase/decrease height and width until the coin fits a
circle on the screen.

On Dec 31 2010, 6:35 am, Phil Endecott <spam_from_goo...@chezphil.org>
wrote:
> Hi All,
>
> Imagine trying to display an accurate ruler on the screen, or
> something like that.  I'd like to know the screen's pixel density in
> pixels-per-inch, or equivalently its dimensions in mm and resolution
> in pixels, so that I know the accurate physical size of the thing that
> I'm drawing.  Is there any way to get this info?
>
> Failing that, I'm aware that the system knows the approximate density
> (one of three values IIRC).  How can I retrieve this programatically?
>
> Thanks,  Phil.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to