Hi

I am having trouble with  detecting a mobile user when emulating an iPhone 
(or any of the mobile devices) in the desktop version of Chrome.  Edge 
seems to work fine.

*request.user_agent() * gives me:
<Storage {'platform': <Storage {'name': 'Windows', 'version': '10'}>, 'os': 
<Storage {'name': 'Windows', 'version': '10'}>, 'bot': False, 'browser': 
<Storage {'name': 'Chrome', 'version': '84.0.4147.135'}>, 'is_mobile': 
*False*, 'is_tablet': False}>

*request.env.http_user_agent *gives me:
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) 
AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 
Safari/602.1'

Is there any trick to getting that emulation working correctly in Chrome?

Andrew

FYI, this is what I get when using the emulation in Edge

request.user_agent()
<Storage {'platform': <Storage {'name': 'iOS', 'version': '13.2.3'}>, 'os': 
<Storage {'name': 'iOS'}>, 'bot': False, 'dist': <Storage {'name': 
'iPhone', 'version': '13.2.3'}>, 'browser': <Storage {'name': 'Safari', 
'version': '13.0.3'}>, 'is_mobile': True, 'is_tablet': False}>

request.env.http_user_agent
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) 
AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 
Safari/604.1 Edg/85.0.4183.121'
On Sunday, 21 July 2013 at 21:22:52 UTC+10 LightDot wrote:

> A quick look at WURFL - looks fine, except for the license which might be 
> problematic for some projects - AGPL v3. They offer commercial licenses 
> too, which might solve the problem for some.
>
> Regards,
> Ales
>
> On Saturday, July 20, 2013 6:14:17 PM UTC+2, Christian Foster Howes wrote:
>>
>> is the WURFL library of devices more or less complete then the mobile 
>> browser list?  http://wurfl.sourceforge.net/  I used the WURFL 5-6 years 
>> ago and found it to be the most complete open-source list at the time.
>>
>> On Wednesday, July 17, 2013 11:57:28 PM UTC-7, AngeloC wrote:
>>>
>>> Hi Marcio,
>>>
>>> I'm planning to grow the supported mobile devices list in web2py, but 
>>> the support right now is fairly extensive. 
>>> I got the user agent strings here 
>>> http://www.useragentstring.com/pages/Mobile%20Browserlist/ and added at 
>>> least one of the devices for each family to the unit test of 
>>> gluon/contrib/user_agent_parser.py .
>>>
>>> That class right now could discriminate between phone and tablets, so I 
>>> think you can't find somany differences with http://mobiledetect.net/ .
>>>
>>> Sincerly,
>>> Angelo
>>>
>>> -- 
>>> Profile: http://it.linkedin.com/in/compagnucciangelo 
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ce5b3f1b-2932-4a30-ae71-634800c1cb35n%40googlegroups.com.

Reply via email to