+ Reply to Thread
Results 1 to 4 of 4

Thread: set user agent as iphone

  1. #1
    Join Date
    Nov 2008
    Posts
    1

    Default set user agent as iphone


    Hi,

    In the documentation for webkit on the google code page. http://code.google.com/android/reference/android/webkit/WebSettings.html#setUserAgent(int)
    WebKit has a java method for setting the user agent string, and it seems that built right into the browser is the ability to set the user agent as the iphone by using setUserAgent(2). I have enough java experience to understand that it is possible, but not enough to figure out how to impliment it ATM.
    Is this method only to be effective when the webview is created when the browser launches?
    Can i use java script ie: javascript:void(setUserAgent(2)
    to change the browsers user agent string during a currently launched webview session?

    Or is there a way to modify the source of the browser so that i can create another application (ie: iphone browser) that launches a webview with the correct webkit.settings settings applied?

    I'd love any push in the right direction, i've googled furriously and feel that not many people are interested in spoofing the user agent string.

  2. #2
    Join Date
    Nov 2009
    Posts
    1

    Default Re: set user agent as iphone

    Quote Originally Posted by ifelder View Post
    Hi,

    In the documentation for webkit on the google code page. http://code.google.com/android/reference/android/webkit/WebSettings.html#setUserAgent(int)
    WebKit has a java method for setting the user agent string, and it seems that built right into the browser is the ability to set the user agent as the iphone by using setUserAgent(2). I have enough java experience to understand that it is possible, but not enough to figure out how to impliment it ATM.
    Is this method only to be effective when the webview is created when the browser launches?
    Can i use java script ie: javascript:void(setUserAgent(2)
    to change the browsers user agent string during a currently launched webview session?

    Or is there a way to modify the source of the browser so that i can create another application (ie: iphone browser) that launches a webview with the correct webkit.settings settings applied?

    I'd love any push in the right direction, i've googled furriously and feel that not many people are interested in spoofing the user agent string.

    You're not the only one looking for this information. I found that proxoid allows you to "spoof" your User Agent but I have't quite got that to work for me in a real situation where a site is using UA redirections. I've noticed some of the new variants of browsers like Steel and Dolphin are setup to have multiple UA's available but what I'm looking for is a way to actually modify the string that is passed. let me know if you find anything on this.

  3. #3
    Join Date
    Dec 2008
    Posts
    518

    Default Re: set user agent as iphone

    This option is included in Loccy's "BetterBrowser" found here http://forum.xda-developers.com/showthread.php?t=551119

    Loccy's "BetterBrowser" comes preinstalled in Cyanogen's latest ROM, so anyone running Cyanogen's latest has this option available to them in the browser settings.
    Phones: T···Mobile· Black G1
    T···Mobile· Black MT4G
    Firmware/SPL: 2.1/Danger SPL
    Rom: Cyanogen Mod v5.0.7
    Recovery: Amon RA Recovery v1.7.0
    SD Card: 8gb Class 6 Apps2SD


    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.

    Google Talk: ThaBadBoy
    Y! Messenger: BadBoynClev

  4. #4
    Join Date
    Nov 2008
    Location
    Northville,MI
    Posts
    6,411

    Default Re: set user agent as iphone


    I think the only thing this is used for is rendering pages that doesn't look right on Android to be viewed on Android. I remeber a few months ago I went to certain pages and it asked me what id I was using, Android wasn't on the list but iPhone was so I selected iPhone and it worked

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.


    Check me out
    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.

+ Reply to Thread

Similar Threads

  1. Torrent agent
    By StephenF in forum Applications
    Replies: 10
    Last Post: 10-21-2009, 12:39 PM
  2. CNET user ratings of iPhone/G1
    By Shel in forum HTC
    Replies: 4
    Last Post: 11-04-2008, 09:24 AM
  3. iPhone 3G user loving G1
    By jimmie geddes in forum HTC
    Replies: 2
    Last Post: 10-21-2008, 11:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts