My web server want distinct android device request with others.
I have noticed http user-agent is a good way to do. But I'm not sure which regular method can distinct user-agent string.Or any other ways also welcome.Thanks
Update
I know client can override the keywords.But,in the situation,client is our own app so ignore the problem is not a big problem.: )
1 Answer
Android is not something that has a user-agent, it is OS. The Web-browser application has a user-agent property. And each developer can freely set the user agent of his own app to anything, even to something like Albus Dumbledore, or Tony Stark. You unfortunately can't determine 100% if it is Android, or not because no one has to tell you this. The best what you can do is to collect a list of User-Agent of the most popular Android web browser apps, and check from this list.
1 Comment
LoranceChen
hi, I have see google android string and firefox all of them can use
Android as a keyword.Google also gives a regex to match android device. Besides, client in android is our own app, so I can ignore client override by himself.I needn't exactly distinct what browser kind in android, just android is ok.does it haven't common method to match?
user-agent.