matomo-org / device-detector

The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
http://devicedetector.net
GNU Lesser General Public License v3.0
2.9k stars 472 forks source link

How about adding more device types? #7544

Open sanchezzzhak opened 8 months ago

sanchezzzhak commented 8 months ago

I suggest adding sub device types (sub-types will not affect the current baseline result, but will give specifics about the type of device):

sub type base type
post scanner smartphone or peripheral
post terminal smartphone or table or peripheral
home cinema tv
projector tv
laptop desktop
nootebok desktop
printer peripheral
ebook reader tablet
watch watches
headset watches
glasses watches

for those who use the device.type will not change anything. if there is a subtype, it will be returned to device.sub_type

What do you think about this idea?

liviuconcioiu commented 8 months ago

I'm not against.

EfekanPekel commented 8 months ago

It would be nice. The set-top boxes (STB) can also be added under the TV as a sub_type.

sgiehl commented 8 months ago

As long as we only introduce sub types we can do that any time. But we should avoid changing the existing types. If that would be required we need to release a new major version for that.

Simbiat commented 7 months ago

There are #7488, #7487, #7489 and potentially #7491 that would benefit from a major release. I wanted to address those in respectful PRs, but I got myself into going through brands (898 parsed) and I have also found at least 91 "issues" (wrong cases in names, entirely wrong brands, incomplete names, etc.), so I thought to finish those first. Then there is a new #7571 I've just raised, that we probably need to find a solution for. What I'm trying to say is there are quite a few relatively significant changes, so I think it's better to not use subtypes, but to add new types instead, and then combine all these changes into a new major release. Not sure if you want to wait for me to finish all brands (875 left), let alone bots, though.

Why I think it's better to have new types? Well, at the least projectors are not TVs, they are not even close, even though you do get an image in the end, ebook readers are not necessarily tablets, there are those the size of a phone, too, and headsets and glasses are definitely not related to watches. In addition, it may be a good idea to think of a way to allow frictionless addition of new types of the devices, too. It would be more straightforward to maintain that in the long run compared to maintaining a list of sub types, where we may start debating whether a device is type A or type B (like Apple Vision: is it glasses or peripheral or "PC"?).