I wanted to the browser ua string.
i am writing an app to programmatically verify the uastring to see if the
oem has changed it from the standard android ua string.

-Dan


On Sat, Feb 20, 2010 at 11:31 PM, Bob Kerns <[email protected]> wrote:

> If you're using a WebView, the answer is yes.
>
> WebView webview = ...;
> WebSettings settings = webview.getSettings();
> String uastring = settings.getUserAgentString();
>
> I don't know of a way to ask the Browser application itself -- but if
> you're doing this level of stuff, you may be wanting more control
> anyway, and want to use a WebView.
>
> What would you do with this information in an app?
>
> I guess you could run a little web server in your app, direct the
> browser to it, pick up the UA string, and redirect to somewhere else.
> Bleh. A whole lot of hackery for something that hardly ever changes.
>
> On Feb 19, 11:21 pm, Dan Raaka <[email protected]> wrote:
> > is there a way to get the User Agent of the Browser on the android
> > device pro grammatically from within an app ?
> >
> > -Dan
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to