0

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
  • 1
    I have check many android platform's default user-agent value, the keyword "Android" able to much almost android platform.If you situation like me, android app is developing by our company self, I think the best way to clarify this is to append some information at user-agent. Commented Sep 6, 2016 at 7:35

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.