Code Monkey home page Code Monkey logo

Comments (9)

serbanghita avatar serbanghita commented on June 3, 2024

@Mddw thanks man! Will commit this asap!

from mobile-detect.

stevendegroote avatar stevendegroote commented on June 3, 2024

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.

Mddw avatar Mddw commented on June 3, 2024

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.

serbanghita avatar serbanghita commented on June 3, 2024

@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.

stevendegroote avatar stevendegroote commented on June 3, 2024

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.

Mddw avatar Mddw commented on June 3, 2024

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.

serbanghita avatar serbanghita commented on June 3, 2024

@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.

Mddw avatar Mddw commented on June 3, 2024

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.

serbanghita avatar serbanghita commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.