Page 1 of 1

Can not detect mobile use opera browser

Posted: Mon Apr 02, 2012 4:54 am
by cuongcnb
Hi,
I am using Tera-WURFL. It is very helpful.

But when I use mobile Nokia 2700c with opera browser, system check and show it's infomation is Opera Mini 4.
How to check mobile is Nokia 2700c??

Thanks!!!!

Re: Can not detect mobile use opera browser

Posted: Mon Apr 02, 2012 7:36 am
by sm_support2
I have good news and bad news. The bad news is that Opera Mini will replace the UA string with its own. The good news is that you can often find the original UA string in a different header (x-operamini-phone-ua, if my memory serves me well).

This means that you can still use the WURFL API to detect the device on the other UA string.

Our goal is to encapsulate this feature in the regular API and hide details under the hood with the next major API release. Of course, the question is how to do it and still perform well. Backward compatibility with the current XML schema is also a requirement.

Thanks

Re: Can not detect mobile use opera browser

Posted: Mon Apr 02, 2012 2:13 pm
by kamermans
For clarification, the Database API (formerly Tera-WURFL) will detect and use the appropriate user agent field (X-OperaMini-Phone-Ua in this case) if you don't explicitly pass the user agent.

For example, if your code looks like this, the API will use the correct header:

Code: Select all

$wurflObj->getDeviceCapabilitiesFromRequest();
If you pass the user agent explicitly, the API will not have access to the other HTTP headers, so it will be detected as a generic Opera Mini device:

Code: Select all

$wurflObj->getDeviceCapabilitiesFromAgent($_SERVER['HTTP_USER_AGENT']);

Re: Can not detect mobile use opera browser

Posted: Wed Apr 04, 2012 10:18 pm
by cuongcnb
Thank you very much! Hi

Re: Can not detect mobile use opera browser

Posted: Tue Aug 27, 2013 9:30 am
by mfarah
Unfortunately in most cases the X-OperaMini-Phone is empty. That's been my experience anyhow.

This makes it very difficult to get meaningful data from WURFL.

Re: Can not detect mobile use opera browser

Posted: Tue Aug 27, 2013 12:09 pm
by kamermans
Please note that Opera has now changed the header from X-OperaMini-Phone-UA to Device-Stock-UA. Older versions of the browser will still use the old header and all newer versions will use the new header.