Determine if device is a tablet

Monte Goulding monte at appisle.net
Tue Aug 14 21:15:27 EDT 2018


On 15/08/2018 00:15, J. Landman Gay via use-livecode 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?

Looks like there’s no actual API for this. Here’s various native hacks:

https://stackoverflow.com/questions/5832368/tablet-or-phone-android <https://stackoverflow.com/questions/5832368/tablet-or-phone-android>
Basically it boils down to deciding what size you consider is a tablet and then checking the screenRect.

Cheers

Monte


More information about the use-livecode mailing list