You are not logged in.

1

Saturday, March 16th 2013, 10:39pm

Easy way to detect 7" tablet v 10" tablet screen?

Just when we thought life had become simple with desktop, tablet and mobile devices we've now got tablets with different size screens.

So my question... Is there any easy way (ie will work on both android and iOS devices) to detect the size of the tablet screen so I can optimise the UI for the device?


Thanks in advance

Tim

Sam Rohn

Trainee

Posts: 110

Location: Brooklyn, New York

Occupation: 360° VR Photographer

  • Send private message

2

Sunday, March 17th 2013, 6:14am

krpano device attribute will detect device and display content accordingly

http://krpano.com/docu/xml/#devices-notes

also see this to get specific screen size

http://krpano.com/docu/xml/#events.onresize

CSS media queries may be also helpful in dealing with such things in HTML

http://www.w3.org/TR/css3-mediaqueries/

http://arcsec.ca/media-query-builder/

sam
Sam Rohn :: 360° Panoramic Photography :: Location Scout :: New York City :: www.samrohn.com

PanoPress :: WordPress Plugin for 360° Panoramas in Flash & HTML5 :: www.panopress.org

3

Monday, March 18th 2013, 1:37pm

Easy way to detect 7" tablet v 10" tablet screen? - possible to add mini-tablet device class in next release?

Thanks Sam

I will do some more testing with onresize.

Also wondering (one for Klaus!) if the next revision of krpano could include a new device class, ie:

mobile - under 6" screen

mini-tablet - 6" to 8" screen

tablet - 8" plus

Thanks again

Tim

4

Wednesday, March 20th 2013, 7:10pm

Hi,

okay, but how to detect such 'mini-tablet'?
There are no reliable ways to do that in Javascript!

E.g. an iPad mini is generally not detectable and the screensize and pixelratio on Android devices are also no reliable informations for the physical size...

Best regards,
Klaus