{"id":28417457,"url":"https://github.com/ua-parser/uap-java","last_synced_at":"2025-06-26T03:31:15.609Z","repository":{"id":23031838,"uuid":"26384591","full_name":"ua-parser/uap-java","owner":"ua-parser","description":"Java implementation of ua-parser","archived":false,"fork":false,"pushed_at":"2024-01-25T13:03:27.000Z","size":98,"stargazers_count":415,"open_issues_count":23,"forks_count":179,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-06-21T06:34:29.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ua-parser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2014-11-09T04:06:58.000Z","updated_at":"2025-06-16T11:29:23.000Z","dependencies_parsed_at":"2023-01-13T22:38:51.097Z","dependency_job_id":"c34a7609-4de1-4f4e-bb85-52af46f97a0c","html_url":"https://github.com/ua-parser/uap-java","commit_stats":{"total_commits":117,"total_committers":25,"mean_commits":4.68,"dds":0.4273504273504274,"last_synced_commit":"61ffd25de944bbe634ff5180104c9cdc07faad29"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ua-parser/uap-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ua-parser","download_url":"https://codeload.github.com/ua-parser/uap-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-java/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261203856,"owners_count":23124607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-04T05:43:18.439Z","updated_at":"2025-06-26T03:31:15.591Z","avatar_url":"https://github.com/ua-parser.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"ua_parser Java Library\n======================\n\nThis is the Java implementation of [ua-parser](https://github.com/ua-parser).\nThe implementation uses the shared regex patterns and overrides from [regexes.yaml](https://github.com/ua-parser/uap-core/blob/master/regexes.yaml).\n\nImport Dependency:\n------\nMaven\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.ua-parser\u003c/groupId\u003e\n  \u003cartifactId\u003euap-java\u003c/artifactId\u003e\n  \u003cversion\u003e1.6.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nGradle (Kotlin)\n```gradle\nimplementation(\"com.github.ua-parser:uap-java:1.6.1\")\n```\n\nSBT\n```sbt\n\"com.github.ua-parser\" % \"uap-java\" % \"1.6.1\"\n```\n\nBuild:\n------\n\nuap-java depends on the uap-core project therefore it uses a Git submodule to represent that dependency.  \nBefore building uap-java, a copy of the uap-core project must be checked out within the local uap-java repository.  \nIn order to do this, execute the following command (from the base `uap-java` folder) to initialize and checkout the submodule.  \n\n```\ngit submodule update --init --remote --checkout --recursive\n```\n\nyou will then have the following folder `uap-java/uap-core` which contains the child repository.\n\nTo build the project, execute\n```\nmvn package\n```\n\nUsage:\n--------\n```java\nimport ua_parser.Parser;\nimport ua_parser.Client;\n\n...\n\nString uaString = \"Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3\";\n\nParser uaParser = new Parser();\nClient c = uaParser.parse(uaString);\n\nSystem.out.println(c.userAgent.family); // =\u003e \"Mobile Safari\"\nSystem.out.println(c.userAgent.major);  // =\u003e \"5\"\nSystem.out.println(c.userAgent.minor);  // =\u003e \"1\"\n\nSystem.out.println(c.os.family);        // =\u003e \"iOS\"\nSystem.out.println(c.os.major);         // =\u003e \"5\"\nSystem.out.println(c.os.minor);         // =\u003e \"1\"\n\nSystem.out.println(c.device.family);    // =\u003e \"iPhone\"\n```\n\n### Changelog\nChangelog can be found [here](https://github.com/ua-parser/uap-java/wiki/ChangeLog).\n\nOriginal Author:\n-------\n\n  * Steve Jiang [@sjiang](https://twitter.com/sjiang)\n\n  Based on the python implementation by Lindsey Simon and using agent data from BrowserScope\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fua-parser%2Fuap-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fua-parser%2Fuap-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fua-parser%2Fuap-java/lists"}