A while ago I found a tip somewhere on how to get to some additional hidden android browser settings including how to change the user agent string so that the browser would identify itself as a desktop browser or iPhone browser while surfing.
This setting is reset between sessions, I didn't use it frequently and eventually forgot how to go about making the change.
Recently I had a need to access these hidden browser settings again and it took quite a long and frustrating search effort to finally locate this information which does not seem to be widely publicized. So, in an effort to save anyone else this trouble, I figured I would post the information on how to do this on a couple Android boards that I frequent and also include a few words that might be picked up as search terms for anyone else trying to find this info. The procedure is very simple. I currently have an HTC Sprint Hero running Android 1.5, so I'm not sure what other devices or builds this will work on...
Open the Android web browser. In the address bar enter 'about:debug' where you would normally enter a URL and hit enter or Go. Be sure to erase the 'http://www.' that the browser likes to leave in the address bar for you. No page will load and you may or may not get a pop-up message 'Debug mode'. But if you now go to Menu > More > Settings in the browser and scroll to the bottom of the list, you should see a new group of options under the 'Debug' heading. The bottom setting is 'UAString' and if selected will give you the option of enabling your browser to identify itself as Android, Desktop or iPhone. Results after making this switch have been mixed, but go ahead and give it a try if you have a need to. I'm not sure what the other options do, so use at your own risk.
Feel free to leave a reply if you found this information helpful, or if it does or does not work on your particular device / build.
search terms: Android Browser Hidden Debug Settings Change User Agent String Identify Desktop Firefox iPhone about:debug UAString
way to go, thank you for the information. might come in handy.
Related
I was thinking last night: wouldn't be it be awesome if we could customize the browser's user agent so that a certain page would load a specific user agent? There are often pages that I want loaded in desktop mode, and it's a little annoying to constantly have to go back and forth to change it.
I figure the best way would be to have a user-defined database containing domain names and their preferred user agent. The browser would run a quick cross-reference between the input domain and the database to see if it's listed. If it is listed, change the user agent to the defined one. If not, use the currently defined user agent.
I REALLY want to be a part of this mod. I have no Java experience whatsoever but I'm a quick learner and want to try it out. Can someone point me in the right direction? Where can I find the source for the browser/good resources for Java?
Thanks!
No one?
I had this idea a while back and think it would be fairly easy, albeit tedious, to accomplish.
in cyanogenmod, the browser code is at: packages/apps/Browser/src/com/android/browser
you'd have to
build the UI to customize the UA for a given domain & set the prefs in the db
check the URI against the prefs prior to initiating the download
if match is found, use per-site setting; else use general setting
alapapa said:
I had this idea a while back and think it would be fairly easy, albeit tedious, to accomplish.
in cyanogenmod, the browser code is at: packages/apps/Browser/src/com/android/browser
you'd have to
build the UI to customize the UA for a given domain & set the prefs in the db
check the URI against the prefs prior to initiating the download
if match is found, use per-site setting; else use general setting
Click to expand...
Click to collapse
Finally! Thanks for the reply. I'll look it over when I get home.
rickytenzer said:
Finally! Thanks for the reply. I'll look it over when I get home.
Click to expand...
Click to collapse
This is a good place to start: http://github.com/CyanogenMod/android
Started looking around at the code. Looking at BrowserSettings.java and I see where the UA gets selected. The goal is to now figure out where userAgent gets set.
Hi This my name is Camillo.
i have a question about my Hd2.
The problem is that if i am on the internet i always been directed to the mobile page, but isnt there a way so that i can go to the normal webpage. i wil really make things a lot easyer. sorry about my inglish. thank you in advance.
Your browser identifies itself as beeing a mobile device.
It is a service of the site to direct you to theit mobile version: less data transfer, less use of flash, silverlight and that kind of stuff.
Mostly those sites have a button to see the original site often at the top or at the bottom of the page.
Other possibility is to change your User Agent string (opera:config) to "Opera/9.64(Windows NT 5.1; U; en) Presto/2.1.1" (without quotes) note original user agent string before changing, so you can revert.
This identifies as a windows opera browser, but possibly websites will not be full functioning.
Also from the settings of the browser
tank you, but can you explain how to.do this to change the string
Just do what I do. Keep Google as a homepage and at the bottom of the page there is a mobile and 'classic' option, click the Classic and you are sorted.
There are registry fixes, but I can never be bothered to change the values and strings.
i have used the google option and it worked like a charm. tank you all for your time and answers.
Even 2 weeks with SGS2 I have troubles to get internet experience as I would like it (and as I expected it to be). Can anyone help me to answer at least one of these questions ?
1.) Are there some other browsers besides Opera Mobile that can do pinch zoom
with text reflow (and I mean exactly how it works in Opera Mobile) ? For
some reasons which go totally beyond me this feature seems to be
"uninteresting" for Android developers
2.) Are there some browsers where you can do fast switching between two
modes of opening links ? (like left click vs. mid click on desktop browsers)
mode 1: click on link = open in active window
mode 2: click on link = open on background in new tab
I need to be able to execute those opens in both modes very quickly which
means by single fast click, otherwise (e.g.: pressing link until popup is
shown) browsing feels terribly sluggish. For example good way of switching
between two modes could be by gestures ?
3.) Alternatively to second question - is there some other good way how to be
able to open fast in active window and also in background new tab (without
switching modes) ? E.g. double clicking on link = open in new tab... ?
4.) Currently I have about 11 web browsers installed and when I click on some
URLs in default browser (Miren browser as well) it will ask me
"Complete action using" with list of all installed browsers. Set default works
only for session its self at best. How do I get rid of it once and for all ?
How can I make it open in the browser from which it was clicked on ? (which
is like the only possible action which I think could ever make sense - so
again - this annoying "feature" of letting you choose which browser to use
goes totally beyond me Anyone can explain to me why someone
would like to have it like that ?)
5.) How can Samsung release default browser which seems to have major flaws
- like impossible to permanently set desktop mode without hacks ? (For a
supposedly best browser phone on the market - moreover the UA string for
desktop is actually not recognized as desktop on ALL web sites)
Checkerboards while scrolling ? No pinch zoom with text reflow (opera style)
? Most likely impossible to permanently set default action (see. 4.) with
multiple browsers installed (without hacks).
Does this mean Samsung doesn't care about the most important
application in the entire phone ? Does it mean it will stay like this also in
official future updates ?
6.) Is it possible to ask for some of this features "somewhere" with chances of
"someone" listening and implementing them ?
comrad said:
Even 2 weeks with SGS2 I have troubles to get internet experience as I would like it (and as I expected it to be). Can anyone help me to answer at least one of these questions ?
6.) Is it possible to ask for some of this features "somewhere" with chances of
"someone" listening and implementing them ?
Click to expand...
Click to collapse
Write to Samsung .
Contact developers of Browsers .
Set up a fund for a developer to develop what you require .
jje
comrad said:
4.) Currently I have about 11 web browsers installed and when I click on some URLs in default browser (Miren browser as well) it will ask me
"Complete action using" with list of all installed browsers. Set default works
only for session its self at best. How do I get rid of it once and for all ?
How can I make it open in the browser from which it was clicked on ? (which
is like the only possible action which I think could ever make sense - so
again - this annoying "feature" of letting you choose which browser to use
goes totally beyond me Anyone can explain to me why someone
would like to have it like that ?)
Click to expand...
Click to collapse
That's because the browser that came with the phone is still set as default. From your home screen, go to Settings > Applications > Manage applications > All (tab at the top) then find "Internet" on the list, click on it and in the bit that says "Launch by default" click on "Clear defaults". After that, whichever browser you select with the "complete action using" and provided you tick the set as default box underneath before clicking on it, will then stick as the default browser
JJEgan said:
Write to Samsung .
Contact developers of Browsers .
Set up a fund for a developer to develop what you require .
jje
Click to expand...
Click to collapse
Or I can do it myself, right ? Excellent. The thing is I am quite sure there are many more people that would appreciate e.g. "text reflow with pinch zoom" so I don't exactly understand why I should pay for development of overall useful feature like that - similarly if you had a web browser that doesn't have any way to input URL you could hardly say that if I want to enter URL I should pay for developing this feature. I consider pinch zoom text reflow to be essential on any mobile browser. Maybe not all people consider it essential but lot's of do. (and those who don't consider it essential would probably used it as well if it was an option in their browser)
Also - why do we have well defined actions on desktop browsers like left clicks and mid clicks (all major desktop browser have it like that) and on the other hand they don't have long press link popup menu with options "open in new tab" (no major desktop browser has it like that - because it would be slow and tedious) So if it makes sense to have those actions on desktop I don't see why it wouldn't make sense on mobile as well. Or why this should be a feature that I would need to pay for. (I don't need to pay for it on any desktop browser where it is a common standard for many years as tabbed browsing is etc.) If this feature is not viewed by majority as essential then I think either majority of users don't realize they would benefit from it or they genuinely don't need it (in which case that would be quite surprising to me - due to fact it is so common on desktops)
At last: regarding Samsung - I have already payed for the phone for which I expect the stock browser to work and I don't think that impossibility to permanently set desktop mode or checkerboards when scrolling qualifies as an OK working product. In this case I am quite sure it is not up to me to pay more money to get right what should have already worked at the moment I purchased the phone. Btw if the stock browser would work OK I wouldn't need any other browser to replace it. (nor to pay for the development process as you suggest)
Isadora said:
After that, whichever browser you select with the "complete action using" and provided you tick the set as default box underneath before clicking on it, will then stick as the default browser
Click to expand...
Click to collapse
Thanks - I wanted to be able to always open link in whatever browser I clicked on it - not just to set default browser. (because e.g. Miren browser also shows this pop-up menu and also uses application set in there). Something like that should be possible right ? However now (following your advice) I was at least able to set Internet as "default" and for reasons unknown to me now it will stick as default even after reboot). Yet to make all "Internet" links open in "Internet" and all "Miren" links to open in "Miren" somehow doesn't seem possible (without pop-ups). For now it's quite OK to have at least "Internet" links open by "Internet".
However here is again my favorite desktop analogy:
If on desktop PC I couldn't make open links in the same browser they were clicked on - the PC would probably very soon ended up being thrown over the window. So either I am stupid and there exists some easy and totally obvious solution how to do it on Android or otherwise the whole thing is just absurd.
Hello, does the absence of answers mean that 1.) indeed can not be enabled on any other browser besides Opera Mobile and 2.) can not be done on any Android browser ? And so on...
Or does it mean that none knows / doesn't care ?
comrad said:
Or does it mean that none knows / doesn't care ?
Click to expand...
Click to collapse
Probably no one thinks it is that important. Since you have 11 browsers installed i think you are probably the best qualified person to tell others which browser supports what. If i make a poll, i doubt more than 1 % of the galaxy s 2 users have more than 4 browsers installed. You might get a place in Guinness Book World Records with 11
comrad said:
Does this mean Samsung doesn't care about the most important
application in the entire phone ? Does it mean it will stay like this also in
official future updates ?
Click to expand...
Click to collapse
Interestingly I thought the most important feature on the phone was the ability to make a receive calls...
Thanks to the awesome power of Google, I found the path to the "UAString" setting.
Many posts on XDA are a little more advanced than NOOB that refer to this setting.
Why would you want to have the browser default to desktop view? Because we have big screens and most mobile sites are HUGE on this screen. This post is not about auto zoom.
Open the Default Browser, type about:debug in the address bar.
Open the menu in the upper right hand corner.
Open settings.
Bottom left panel, open debug.
Third down on the right, open UAString.
Choose desktop from the popup menu.
"What did I just do?" You set the browser to identify the tablet as a desktop. The internet is so smart that it displays pages according to the type of device requesting the page. But internet thinks Android is a mobile platform and sends you a mobile view by default. Pretty cool, huh? So now you've outsmarted the internet. Sit back and enjoy.
PS: I did search the forum. I couldn't find out how to "set the UAString", thus, the new thread.
CaptainKelley said:
Thanks to the awesome power of Google, I found the path to the "UAString" setting.
Many posts on XDA are a little more advanced than NOOB that refer to this setting.
Why would you want to have the browser default to desktop view? Because we have big screens and most mobile sites are HUGE on this screen. This post is not about auto zoom.
Open the Default Browser, type about:debug in the address bar.
Open the menu in the upper right hand corner.
Open settings.
Bottom left panel, open debug.
Third down on the right, open UAString.
Choose desktop from the popup menu.
"What did I just do?" You set the browser to identify the tablet as a desktop. The internet is so smart that it displays pages according to the type of device requesting the page. But internet thinks Android is a mobile platform and sends you a mobile view by default. Pretty cool, huh? So now you've outsmarted the internet. Sit back and enjoy.
PS: I did search the forum. I couldn't find out how to "set the UAString", thus, the new thread.
Click to expand...
Click to collapse
Well documented. Props! Btw this should work for all if not most android devices and the stock browser. People may choose to do this if they don't want to have several different browsers.
Sent from my Transformer Prime TF201 using xda premium
cool find but why can't you just select "request desktop site" from the menu? I already had that selected and desktop was already enabled in the debug settings.
sdynak said:
cool find but why can't you just select "request desktop site" from the menu? I already had that selected and desktop was already enabled in the debug settings.
Click to expand...
Click to collapse
Seems like that box is website dependant. If you go to another site, you have to check it again, like it's cookie or cache dependant.
So this method sticks after browser is shutdown or device reboots? Or will these need to be applied every time?
CaptainKelley said:
Seems like that box is website dependant. If you go to another site, you have to check it again, like it's cookie or cache dependant.
Click to expand...
Click to collapse
ok.. yhea I do see that.. maybe it stays by website .. have not played with enough to see when it does stick or not.. hopefully this will.
I'll just stick to ICS browser +.They got it right the 1st time.
sdynak said:
ok.. yhea I do see that.. maybe it stays by website .. have not played with enough to see when it does stick or not.. hopefully this will.
Click to expand...
Click to collapse
I believe you have to request desktop site every time you open a new tab in the ICS browser, which is quite annoying if you always want to open websites in 'desktop' mode.
even with the ua string set to desktop it would still bring up mobile versions of sites for me all the time. quite annoying.
I have both a Galaxy Nexus and a Galaxy Tab 10.1, both of which have ICS. For a while now my main android web browser of choice has been ICS Browser +, which is built on top of the stock browser, with a few additions such as being able to permanently change the user agent string to "desktop". I know that the latest version of the Chrome browser has the ability to view web pages in desktop mode, but to my knowledge you must select the "Desktop Mode" checkbox in the settings every time you want the current web page to be rendered in desktop mode. Is there a way to make that desktop mode checkbox persistent or permanently checked? I really want to start using Chrome as my main android browser, but I need to know that I can permanently have Desktop Mode. I hate mobile sites!
I am also interested.
Also interested.
+1 Wont use Chrome without this option
solution
i got fed up with this tonight and found it. sorry no link cuz new account
Basically, if you have a rooted device you can do this easily. Go to root/data/local/ and make a file called "chrome-command-line"
inside you just put something like this:
chrome --user-agent=" Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19"
Kill/restart chrome to apply changes
Instead of copying the useragent from my PC's chrome, I went to whatsmyuseragent.com, switched to desktop mode, and copied that. What I got is for my tf300 so yours may differ.
Apologies for any errors, I'm not a technical person, just thought I would make my first post count
you can use this app
https://play.google.com/store/apps/details?id=com.appo2.ua
Big thanks rumspringa9. :good: