No there is no way, beyond having the user calibrate their screen for you if they want this kind of feature.
Trying to maintain a device database seems like a losing battle. On Tue, Oct 25, 2011 at 1:44 PM, Andrew Hughes <[email protected]> wrote: > Alright. Thank you. I'm not sure if it's something that could be enforced > by the CTS, but it would be nice if it was :) > > I want to be able to draw things in real world units (such as a measurement > ruler or lines of binder paper that are *actually* college or wide ruled, > etc). Do you have any suggestions of another way to do this besides keeping > a database of known devices and their dpi? > > > On Tue, Oct 25, 2011 at 1:27 PM, Dianne Hackborn <[email protected]>wrote: > >> Sorry you just can't use them. Nothing in the platform makes use of them. >> They need to be set by the manufacturer (there is no way for the platform >> to know what they are), and as of today they are just not consistently set >> correctly across devices, and because nothing in the platform relies on them >> it is easy for devices to have them set incorrectly. >> >> This information is just not available, sorry to say. >> >> Why do you need the actual physical dpi? >> >> >> On Tue, Oct 25, 2011 at 12:44 PM, ashughes <[email protected]> wrote: >> >>> The values reported by xdpi and ydpi are still incorrect on some devices. >>> >>> Samsung Galaxy Tab 10.1 (from Google I/O): >>> xdpi: 160.15764 >>> ydpi: 160.0 >>> >>> Lenovo ThinkPad Tablet: >>> xdpi: 160.15764 >>> ydpi: 160.0 >>> >>> HTC Jetstream: >>> xdpi: 150.51852 >>> ydpi: 149.41176 >>> >>> The Galaxy Tab and ThinkPad Tablet report incorrect values, while the >>> Jetstream reports correct values. I don't know why the xdpi and ydpi values >>> are different (unless they *actually* are on they physical display, in >>> which case that makes sense since both values for the Jetstream are close to >>> the correct overall value). >>> >>> Is the value reported by xdpi and ydpi set somewhere by the device >>> manufacturer? Is that why the values are correct on some devices and not on >>> others? Is there going to be any guarantee in the future that these values >>> will always be reported as correct (it would be great if this were a >>> requirement for passing the CTS)? >>> >>> It would be really helpful to be able to reliably query for the actual >>> dpi of a device without having to rely on a database of known device values. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >>> >> >> >> >> -- >> Dianne Hackborn >> Android framework engineer >> [email protected] >> >> Note: please don't send private questions to me, as I don't have time to >> provide private support, and so won't reply to such e-mails. All such >> questions should be posted on public forums, where I and others can see and >> answer them. >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

