What capabilities need to enable to use "form_factor"

sam@WU2013
Posts: 11
Joined: Tue Feb 21, 2017 4:09 am

What capabilities need to enable to use "form_factor"

Postby sam@WU2013 » Tue Feb 21, 2017 4:12 am

I am using WURFL, in order to detect `form_factor`

I enable the following capability.

- "form_factor"

However, once I run the code to detect `form_factor`, it crashes.

Then, when I look at source code

wurfl/wurfl-api/WURFL/VirtualCapability/IsSmartphone.php
wurfl/wurfl-api/WURFL/VirtualCapability/FormFactor.php

I realize I need to enable rest of the capabilities.


- "ux_full_desktop"
- "is_smarttv"
- "is_wireless_device"
- "is_tablet"

- "pointing_method"
- "resolution_width"
- "device_os_version"
- "device_os"
- "can_assign_phone_number"

I was wondering, is this the complete list of capabilities which required, in order to support `form_factor`?

As I don't find any detailed documentation (https://www.scientiamobile.com/wurflCapability) regarding `form_factor`.

david
Posts: 20
Joined: Thu Jun 30, 2016 9:54 am

Re: What capabilities need to enable to use "form_factor"

Postby david » Tue Feb 21, 2017 11:09 am

Hello,

Virtual capabilities are computed values that may look at regular capabilities to derive themselves. As such, there are some regular capabilities that have to be included in the capability filter in order for the virtual capabilities to work correctly. These capabilities are as follows:
  • Code: Select all

    device_os
    device_os_version
    is_tablet
    is_wireless_device
    pointing_method
    preferred_markup
    resolution_height
    resolution_width
    ux_full_desktop
    xhtml_support_level
    is_smarttv
    can_assign_phone_number
    brand_name
    model_name
    marketing_name
    mobile_browser_version
If you are using an API version prior to v1.8, then you will have to make sure that all of these capabilities are included.

Best,
David

sam@WU2013
Posts: 11
Joined: Tue Feb 21, 2017 4:09 am

Re: What capabilities need to enable to use "form_factor"

Postby sam@WU2013 » Tue Feb 21, 2017 9:31 pm

Hi David,

Thanks. Gonna try it out.

Isn't it will be better, if such info is available in official documentation?

david
Posts: 20
Joined: Thu Jun 30, 2016 9:54 am

Re: What capabilities need to enable to use "form_factor"

Postby david » Tue Feb 21, 2017 9:43 pm

Hi Sam,

The documentation on our PHP API is for the most current API version release (v1.8.3) in which this information is not really needed since you no longer need to explicitly add these capabilities starting in v1.8.0. If you are using an older API version, you should be able to find the information in the README file that came with your API. You may have a point however in which we should have our legacy information more accessible in the future. I will talk to our team and see what we can do. In the meantime, let me know if you run into any other issues.

Best,
David


Who is online

Users browsing this forum: No registered users and 1 guest