Strategy for differentiating tablet from phone?

Questions about the WURFL Cloud service.

Strategy for differentiating tablet from phone?

Postby robertf » Wed Jun 05, 2013 6:41 pm

Can anyone suggest a good strategy for differentiating a tablet from a smartphone? Currently, I'm trying to differentiate them using the "has_cellular_radio" and "is_tablet" capabilities for a mobile phone and tablet respectively. I've been testing by overriding the User Agent setting in Chrome's Developer Tools and have noticed that some tablets seem to have the "has_cellular_radio" capability set to True. For example, the "Firefox 14 -- Android Tablet" user agent string "Mozilla/5.0 (Android; Tablet; rv:14.0) Gecko/14.0 Firefox/14.0" indicates that the device is a tablet and has a cellular radio. The same thing happens for "Chrome -- Android Tablet" with ua = "Mozilla/5.0 (Linux; Android 4.1.2; Nexus 7 Build/JZ054K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19". I guess one option would just be to assume a device is a tablet whenever "is_tablet" is True but this could make my code's logic kind of wonky. I've tried subsitituting the virtual capability "is_smartphone" for "has_cellular_radio" and this makes seems to fix the problem but the documentation suggests that this is_smartphone capability may not always be available (in the future). Any thoughts?

Thanks.
robertf
 
Posts: 6
Joined: Mon Jun 03, 2013 4:21 pm

Re: Strategy for differentiating tablet from phone?

Postby kamermans » Thu Jun 06, 2013 12:23 pm

With the WURFL Cloud Service, you can certainly use is_smartphone, although it sounds like you are more interested in differentiating tablets from all other wireless/mobile devices. In this case you can use the following logic:

Code: Select all
if (is_wireless_device) {
   if (is_tablet) {
       // do something for tablets
   } else {
       // do something for all other mobile devices
   }
}
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
kamermans
 
Posts: 383
Joined: Mon Jun 06, 2011 9:50 am

Re: Strategy for differentiating tablet from phone?

Postby sm_support2 » Fri Jun 07, 2013 7:43 am

In addition to Steve's answer, I am not sure about the assumption that "has_cellular_radio=true" implies that the device is not a a tablet. There are several counter-examples to this, which include early iPads and early Kindles too.

As far as the definition of smartphone goes, that's a definition that is bound to vary over time, region and personal preferences, so the virtual capability value we provide is simply one arbitrary definition that users may find useful or not. Many do. Others prefer to roll their own definition of what they consider a smartphone based on their specific needs.

Thanks
sm_support2
 
Posts: 282
Joined: Mon Jun 20, 2011 5:04 pm

Re: Strategy for differentiating tablet from phone?

Postby kamermans » Fri Jun 07, 2013 1:03 pm

To expand on the has_cellular_radio capability, this applies to devices with cellular data access. If you want to tell if the device can make/receive phone calls, you can use can_assign_phone_number, but note that this excludes phone-sized mobile devices like the iPod, Sony PSP, Samsung Galaxy Player, etc.
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
kamermans
 
Posts: 383
Joined: Mon Jun 06, 2011 9:50 am

Re: Strategy for differentiating tablet from phone?

Postby robertf » Fri Jun 07, 2013 1:41 pm

I want to thank both of you for taking time to answer my question. Your answers have been very helpful.
robertf
 
Posts: 6
Joined: Mon Jun 03, 2013 4:21 pm


Return to ScientiaMobile WURFL Cloud Service

Who is online

Users browsing this forum: No registered users and 3 guests