Closed liviuconcioiu closed 1 year ago
Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1
Now device type is null
@angelofan I also don't see any part of that user agent that says anything about which device this could be (apart from an iPhone).
Open https://lx3rzx16x9.codesandbox.io/ on my phone, the device type is null
I copied the user agent on the phone to the computer, the device type is smartphone
@Findus23 At least "Mobile" is included in the user agent. Doesn't it mean that it is a smartphone?
in phone:
"device":{
"type":"",
"brand":"Apple",
"model":"",
}
in pc:
"device":{
"type":"smartphone",
"brand":"Apple",
"model":"iPhone",
}
Why are they different?
Hi,
https://lx3rzx16x9.codesandbox.io/ uses https://github.com/etienne-martin/device-detector-js which is an implementation in JS that only shares the rules list.
The PHP version detects a "deviceName" of "smartphone":
In case this is a bug with the JS implementation, I'd recommend you to open an issue there. (and indeed I can reproduce the issue on mobile safari)
Thank you @Findus23, the inconsistency is due to Safari not supporting the lookbehind syntax for regexes as mentioned here in the readme: https://github.com/etienne-martin/device-detector-js#%EF%B8%8F-browser-environment
It seems I have to integrate the device-detector into my server.
do you have any ideas about what brand the ZL80 smartphone has?
I think is a car tablet made by Alps (Alps Alpine https://www.alpsalpine.com/e/), but also BDF sells the exact same model under their brand. If you go to http://specdevice.com/showspec.php?id=6ae3-d410-0406-6a000033c587 and click on OS details, you will see FINGERPRINT: alps/full_flycom6580_we_m/flycom6580_we_m:6.0/MRA58K/1553934260:user/test-keys
Device type is not detected for those particular user agents. It should be seen as smartphone.