Page 1 of 1

What capabilities need to enable to use "form_factor"

Posted: Tue Feb 21, 2017 4:12 am
by sam@WU2013
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`.

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

Posted: Tue Feb 21, 2017 11:09 am
by david
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

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

Posted: Tue Feb 21, 2017 9:31 pm
by sam@WU2013
Hi David,

Thanks. Gonna try it out.

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

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

Posted: Tue Feb 21, 2017 9:43 pm
by david
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