matomo-org / matomo-org/device-detector

getDeviceName unable to decipher Android user agent

Open
#8,151 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
3.5k
Forks
513
Avg merge
1d 21h
Merged PRs (30d)
11

Description

I'm having an issue where the `"matomo/device-detector": "^6.4"` is provides an empty result when running `getDeviceName()` on an android user agent. An example of the user agent is `Superbalist/3.50.0(com.superbalist.android;329;Android;10;API29)`

However, it is able to provide a non-empty result when running a similar user agent but for Huawei devices which looks like the following:
`Superbalist/3.50.0-huawei(com.superbalist.huawei;329;Android;12;API31)`

The result I'm expecting to be returned from `getDeviceName()` for both Android and Huawei on the examples provided is `smartphone`

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing getDeviceName() with the two Android user-agent examples in the issue and compare their detection paths. Done means the Android and Huawei examples both return "smartphone" instead of an empty result for the Android example.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.