0

Is there any way to get the user agent or model of the android wear programatically?

Something like this

Mozilla/5.0 (Linux; Android 4.4; Moto 360 Build/KNX01S) AppleWebKit/537.36 (KHTML, like Gecko) WIB/0.9.8 Mobile Safari/537.36

Thanks

lapinkoira
  • 8,320
  • 9
  • 51
  • 94

1 Answers1

0

You may want to try using UseragentAPI which can be used in device detection, increased accuracy and new useragent types. This can be used to detect useragent types for wearables.

For successful HTTP requests, an example response would be:

{
    "data": {
        "ua_type": "Desktop",
        "os_name": "Linux",
        "browser_name": "Chrome",
        "browser_version": "58.0.3029.110",
        "engine_name": "WebKit",
        "engine_version": "537.36"
    }
}

If you're only looking for the Android Wear model, this suggested solution which works perfectly on watch might also help.

Community
  • 1
  • 1
Teyam
  • 7,686
  • 3
  • 15
  • 22