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         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to