0

I am trying to detect android browser in java.

I know we can sniff the user agent(UAgentInfo.java) and detect the device and know whether it is an android device or ios device. But i do not want to detect the device .

What i want to do is that : After detecting the android device, I want to know what kind of browser the user is using. If it is an android browser then i will show another kind of UI .

Is there any way to do it ? Any help is deeply appreciated.

4
  • 1
    The same thing is included in user-agent but you need to search into the whole string for keywords say mozilla, chrome etc. to see if you can find a match. Commented Sep 30, 2014 at 9:39
  • Instead of giving down votes , provide information if you happen to have that on the subject. I don't care about down votes, I am more interested in knowing whether such a thing can be done. Commented Sep 30, 2014 at 9:39
  • And I didn't down vote Commented Sep 30, 2014 at 9:40
  • @DarshanLila, why not to post your comment as an answer. Because it is. Commented Sep 30, 2014 at 9:41

1 Answer 1

1

The same thing is included in user-agent but you need to search into the whole string for keywords say mozilla, chrome etc. to see if you can find a match.

There can be multiple keywords filter to narrow down your search to exactly detect the type of browser. For eg.

Mozilla If keywords IN="mozilla","firefox" and NOT IN="IE"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.