Reputation: 5030
I am using this library to detect the device and client program from the http user agent string.
On the library's demo page, they are able to distinguish if the device is a desktop or smartphone even if the device model is not detected. However, they don't have a document to state what function they have use to do that. On the read me on github, I guessed it is $dd->getDevice()
, but it seems that function only return an integer 1 or 0 (and I have no idea what does it means)
They didn't provide the source code for the demo page, and there are no further documentation other than the read me page. Anybody know what is the function they are using to detect if it is smartphone or desktop on the demo page?
Upvotes: -3
Views: 304
Reputation: 12322
in the file DeviceDetector.php there is a function isDesktop()
with the following statement
/**
* Returns if the parsed UA was identified as desktop device
* Desktop devices are all devices with an unknown type that are running a desktop os
*
* @see self::$desktopOsArray
*
* @return bool
*/
public function isDesktop()
Upvotes: 1