Reputation: 5308
Kindly provide me the Android code to get the User-Agent from the Android mobile device like in J2me where we can get System information about the mobile device using the J2me API.
Also , is there any list of Rdf or useragent string/ xml for the different Android devices available in the market.
Upvotes: 1
Views: 13376
Reputation: 81
Just to make sure you are getting the correct string or you want to check what a browser's user agent string is that works try this site. http://www.whatsmyuseragent.com/
Also the user-agent string is modifiable but doing so doesn't change the browser itself. (Learned that the hard way :)
Joshua.
Upvotes: 1
Reputation: 86
try this: http://developer.android.com/reference/android/webkit/WebSettings.html#getUserAgentString()
Upvotes: 7
Reputation: 89566
The User-Agent
header is private to the Browser application. Also note that different browsers (there are quite a few on the market) will use different User-Agent
strings. Also, I don't know of any list of Android User-Agent
strings.
If you're just looking to test whether someone is using Android to browse your website, just check for "android" in the User-Agent
string.
Upvotes: 0