Determine if device is a tablet

hakan at exformedia.se hakan at exformedia.se
Wed Aug 15 08:23:24 EDT 2018


I think the idea is that if you have enough space for a viable landscape representation I think you should support it. The line between phone and tablet is very blurry and according to the rumours even Apple will start to support landscape multi-column apps on the new phones. Eg. :

https://gadgets.ndtv.com/mobiles/news/apple-iphone-x-plus-6-5-inch-2018-landscape-mode-ios-12-beta-1893260

:-Håkan
On 15 Aug 2018, 08:32 +0200, J. Landman Gay via use-livecode <use-livecode at lists.runrev.com>, wrote:
> On 8/14/18 11:13 PM, Richard Gaskin via use-livecode wrote:
> > J. Landman Gay wrote:
> >
> > > I need to determine whether the current mobile device is a tablet or a
> > > phone. On iOS I can use "the machine" but on Android it only provides
> > > the manufacturer's name.
> > >
> > > Does anyone know a way to do that?
> >
> > For screen metrics or device capabilities?
> >
>
> Metrics. I want to allow landcape orientation on tablets but only
> portrait for phones.
>
> Phil suggested getting device info, but mobileBuildInfo doesn't return
> anything better than "the machine." The server idea doesn't return
> specific enough info either if it isn't an i-thing.
>
> Monte mentioned the screenrect, which is what I started with, but it's a
> wild guess. Right now I'm using an arbitrary screen pixel width but I
> don't think it will work everywhere.
>
> I thought about using a ratio but I'm not sure what would be most
> accurate. And I'm not clear on how different resolutions affect it.
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list