Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devices recognised as multiple types (e.g. tablet and mobile) #107

Open
BorePlusPlus opened this issue Nov 26, 2020 · 1 comment
Open

Devices recognised as multiple types (e.g. tablet and mobile) #107

BorePlusPlus opened this issue Nov 26, 2020 · 1 comment

Comments

@BorePlusPlus
Copy link
Contributor

I came across a fair few cases where a device returns true on multiple of is_mobile, is_tablet, and is_pc. I believe this to be a bug (but am open to hearing in which cases it isn't).
A most common example I've seen is iPad using a Mobile Chrome getting marked as both mobile and tablet.

BorePlusPlus added a commit to BorePlusPlus/python-user-agents that referenced this issue Nov 26, 2020
There are cases (e.g. iPad using Chrome mobile) where a device ends up
being marked as both tablet and mobile.

The commit gives priority to explicit device family over determining it
from browser family.

selwin#107
BorePlusPlus added a commit to BorePlusPlus/python-user-agents that referenced this issue Nov 26, 2020
There are cases (e.g. iPad using Chrome mobile) where a device ends up
being marked as both tablet and mobile.

The commit gives priority to explicit device family over determining it
from browser family.

selwin#107
BorePlusPlus added a commit to BorePlusPlus/python-user-agents that referenced this issue Nov 26, 2020
@BorePlusPlus BorePlusPlus changed the title Devices recognised as multiple types (e.g. table and mobile) Devices recognised as multiple types (e.g. tablet and mobile) Nov 27, 2020
selwin pushed a commit that referenced this issue Mar 16, 2021
* Don't mark tablet using mobile browser as mobile

There are cases (e.g. iPad using Chrome mobile) where a device ends up
being marked as both tablet and mobile.

The commit gives priority to explicit device family over determining it
from browser family.

#107

* Mark Kindle as a touch capable tablet...

...even when requesting a desktop version of page.

See:
https://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html

#107

* Ensure devices marked as tablets are not marked mobile as well due to their OS

* Ensure PC not marked as mobile due to browser family

* Ensure iPad is recognised as touch capable

Irrespective of the browser it is running

* Mark generic android tablets as tablets only

and not PCs

* Ensure Generic Smartphone is marked as touch capable mobile device
@kimihito
Copy link

Could you please publish #108 on pypi that addresses this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@kimihito @BorePlusPlus and others