Yes, but to intercept the requests to the browser using a proxy (as the OP suggests) requires rooting the device.
Sure, redirecting the links is one thing if you have control of the webview, for arbitrary ajax traffic it's a no. kris On Mon, Aug 6, 2012 at 5:32 PM, Kostya Vasilyev <[email protected]> wrote: > > 2012/8/7 Kristopher Micinski <[email protected]> >> >> Yes, but implementing this proxy would require rooting the device. > > > Not necessarily - if the WebView is under the developer's control (i.e. > there is no intention to do this system-wide), then it should be possible to > feed the WebView a URL that refers to a server running on localhost (as part > of the same app). > > -- K > >> For the second question you're asking, I had hoped to imply that this >> was my plan, and the answer is that I believe you cannot do so. >> >> kris >> >> On Mon, Aug 6, 2012 at 4:54 PM, Gelonida N <[email protected]> wrote: >> > Hi Chris, >> > >> > >> > On 08/06/2012 01:33 AM, Kristopher Micinski wrote: >> >> >> >> I doubt it, I tried to find a way to proxy traffic, but there's no >> >> easy hook. I.e., if you need something that is in 11 and you're on 8 >> >> you're just plain out of luck. >> >> >> >> There is one solution, but implementing it accurately would be dumb >> >> because of how much ajax stuff (and related) there is now: you can >> >> look at the HTML statically, pull out the image tags, and render the >> >> page yourself... There obviously isn't an easy way to do this, so this >> >> answer is as good as "rewrite webkit." >> > >> > >> > Hmm an alternative would be implementing a filtering web proxy. Much >> > more >> > complicated, but perhaps doable. >> > Is there any way, that I can create an application, that would use a >> > webview >> > with it's custom proxy, whereas the normal browser (or other web views) >> > would just use the default proxy setup (which is in my case 'no proxy') >> > >> >> >> >> >> >> On Sun, Aug 5, 2012 at 6:15 PM, Gelonida N <[email protected]> wrote: >> >>> >> >>> I'm having an HTC desire (Android2.2.2 Froyo API 8) >> >>> and I wanted to create a custom browser (using WebViewclient), that >> >>> intercepts some url requests (<img> tags) and skips loading these >> >>> images. >> >>> >> >>> public WebResourceResponse shouldInterceptRequest (WebView view, >> >>> String >> >>> url) >> >>> seems to be what I need. >> >>> >> >>> However I'm only on API 8 and the function has been introduced on API >> >>> 11. >> >>> >> >>> Is there any way to do what I want to do with API 8 >> >>> >> >>> My phone is supposed to be updatable to Gingerbread, but that brings >> >>> me >> >>> only >> >>> to API 9 (or 10) and still not to 11. >> >>> >> >>> >> > >> > >> > -- >> > 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 >> >> -- >> 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 > > > -- > 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 -- 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

