Can not detect mobile use opera browser

Ask... and you may receive!
cuongcnb
Posts: 2
Joined: Mon Apr 02, 2012 4:48 am

Can not detect mobile use opera browser

Postby cuongcnb » Mon Apr 02, 2012 4:54 am

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!!!!

sm_support2
Posts: 294
Joined: Mon Jun 20, 2011 5:04 pm

Re: Can not detect mobile use opera browser

Postby sm_support2 » Mon Apr 02, 2012 7:36 am

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

kamermans
Posts: 392
Joined: Mon Jun 06, 2011 9:50 am

Re: Can not detect mobile use opera browser

Postby kamermans » Mon Apr 02, 2012 2:13 pm

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']);
Last edited by kamermans on Tue Aug 27, 2013 12:06 pm, edited 1 time in total.
Reason: Code sample typo
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!

cuongcnb
Posts: 2
Joined: Mon Apr 02, 2012 4:48 am

Re: Can not detect mobile use opera browser

Postby cuongcnb » Wed Apr 04, 2012 10:18 pm

Thank you very much! Hi

mfarah
Posts: 2
Joined: Tue Jun 12, 2012 6:16 am

Re: Can not detect mobile use opera browser

Postby mfarah » Tue Aug 27, 2013 9:30 am

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.

kamermans
Posts: 392
Joined: Mon Jun 06, 2011 9:50 am

Re: Can not detect mobile use opera browser

Postby kamermans » Tue Aug 27, 2013 12:09 pm

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.
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!


Who is online

Users browsing this forum: No registered users and 1 guest