All Virtual Capabilities show me error

Posts: 1
Joined: Fri Jul 10, 2015 7:46 pm

All Virtual Capabilities show me error

Postby jotaincubus » Fri Jul 10, 2015 7:56 pm

I try to use virtual capabilities is_smartphone, is_full_desktop, is_mobile but I get error:
Uncaught exception 'InvalidArgumentException' with message 'no capability named [is_mobile] is present in wurfl.
I don't know what is my mistake because I use same code in

Code: Select all

$wurflManagerFactory = new WURFL_WURFLManagerFactory($wurflConfig);
$wurflManager = $wurflManagerFactory->create();
$requestingDevice = $wurflManager->getDeviceForHttpRequest($_SERVER);

$is_wireless = $requestingDevice->getCapability('is_wireless_device'); // work fine
$is_tablet = $requestingDevice->getCapability('is_tablet'); // work fine
$is_smartphone = $requestingDevice->getCapability('is_smartphone'); // show me error
It's exactly same code in your tutorial webpage.

Thank you for answer me...


Re: All Virtual Capabilities show me error

Postby Elliotfehr » Sun Jul 12, 2015 9:54 pm

In order to use the virtual capabilities, you will want to use the `getVirtualCapability('example_virtual_capability')` as opposed to the `getCapability('example_physical_capability')`.

I do see the confusion here, as the link you provided does make a reference to the incorrect capability and will be updated shortly.

Thank you,


Who is online

Users browsing this forum: No registered users and 1 guest