Code Monkey home page Code Monkey logo

device-detector's Issues

Unable Capture platform deatils using User Agent in Spring Boot for in Some Mobile Device

I'm facing an issue with capturing device details for Xiaomi phones using the user agent.

using the following user agent:
Mozilla/5.0 (Linux; Android 12; 2109119DI) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36

I have followed the following link: https://github.com/mngsk/device-detector

My code is like:

   `` DeviceDetector dd = new DeviceDetectorBuilder().build();
    Detection detection = dd.detect(userAgent);
    System.out.println(detection.getDevice());``

in this I'm getting null value for the device, the model,brand

{ "model": null, "type": "smartphone", "brand": null }

Expected Output is:
{ id: "XI", type: "smartphone", brand: "Xiaomi", model: "Mi 11 Lite 5G NE" }

please help me to solve this issue

using Java Version: JDK11

last version

The latest version of Java does not seem to be very accurate, I wonder if it has not been updated.But the latest version of PHP is accurate. Could you update Java as well? Thank you

Dependency to org.apache.commons.lang3.StringUtils

Hi!

The dependency to org.apache.commons.lang3.StringUtils is not specified in the pom.xml file.
It is used in the AbstractParser last line of code:

  protected String buildVersion(String version, Matcher matcher) {
    version = buildByMatch(version, matcher);
    if (version == null) {
      return null;
    }

    version = version.replace("_", ".");
    return StringUtils.strip(version, " .");
  }

All the best!

performance

Hello, after using it, I found that each Java parsing takes about 20ms, but PHP parsing can be completed within about 5ms, Java performance is too poor, I wonder if you have noticed the performance problem, looking forward to your recovery, thank you

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.