Comments (9)
@Mddw thanks man! Will commit this asap!
from mobile-detect.
Is it not possible to check with the below expression?
'WindowsPhoneOS' => 'Windows Phone|XBLWP7|ZuneWP7'
It would be simpler, faster and compatible with future versions, contrary to the above suggestion.
from mobile-detect.
It's my understanding that Windows Mobile 6.5 has Windows Phone in its UA and is not a Windows Phone.
Moreover, you can't realy presume future versions UA.
from mobile-detect.
@stevendegroote @Mddw yes I can use a simple regex, but I prefer to keep it segmented because it's easier for me to spot a future conflict and it also keeps me informed to make a future differentiation between Windows Mobile and Windows Phone.
from mobile-detect.
Fair enough, I can live with that. I just wanted to point some additional attention to trying to ensure as much future compatibility as possible to reduce workload for you as well as for the people using this library.
Keep up the good work!
from mobile-detect.
A little different issue, but always on the same phone, so I post it here.
On the same phone/OS (Nokia Lumia 620/WP8), there is a desktop mode you can set in settings. It changes the UA to :
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; ARM; Touch; WPDesktop)
With this setting and according to demo.mobiledetect.net, only isMobile is True, everything else is falsy.
I don't know what's the expected behavior of mobile-detect when a phone is in desktop mode, but I think it should not trigger isMobile().
BTW I did not check in the code what's causing this, but if you need some testing just ask, I'll be happy to help.
edit : i came on this issue directly, so did not see the same issue 58 : #58
from mobile-detect.
@Mddw - I have to think about this. I could look for WPDesktop
but since the script's main purpose is to detect the mobile devices no matter what it might impact other users. I have to gather some feedback. Thanks for revealing this!
from mobile-detect.
I think you should do both : leave the choice to the developer.
Maybe a wantDesktop() completing isMobile() ?
Not a priority maybe, but please consider it.
from mobile-detect.
Done, check https://github.com/serbanghita/Mobile-Detect/archive/2.5.8.zip
Also, @Mddw isDesktopMode
should be a good starting point.
from mobile-detect.
Related Issues (20)
- Safari on iPad: completely incorrect reports HOT 1
- Trying to get in touch regarding a security issue HOT 2
- MD v 3.74 - PHP Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST) in Mobile_Detect.php on line 245 HOT 1
- How to check Desktop site setting On OR Off in mobile browser
- isMobile doesn't cache matches HOT 2
- isEdge() return false on Edge Browser
- 4.8.x HOT 4
- isMobile and IsTablet failing on ios devices - using safari HOT 1
- Port functionality from `jenssegers/agent` HOT 11
- Restore implicit use of `HTTP_USER_AGENT` in 4.8.x branch HOT 3
- Chrome's user agent reduction results in no longer detecting Android tablets as a tablet device HOT 1
- Getting a Parse error on the latest version (4.8.03) on PHP 7.1.33 HOT 4
- Google SERP links open as the mobile version HOT 5
- [bug] No user-agent has been set HOT 18
- [bug] breaking change pushed as patch HOT 3
- Need advice on `No valid user-agent has been set` PHP Fatal error HOT 4
- Tablet IOS detection HOT 1
- I dont understand HOT 8
- php 8.4 - implicit nulls are deprecated HOT 1
- Windows Wechat
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobile-detect.