Monday, August 6, 2012

[android-developers] Re: webview client, that intercepts requests on API 8

On 08/06/2012 11:52 PM, Kristopher Micinski wrote:
> On Mon, Aug 6, 2012 at 5:46 PM, Kostya Vasilyev <kmansoft@gmail.com> wrote:
>> 2012/8/7 Kristopher Micinski <krismicinski@gmail.com>
>>>
>>> Yes, but to intercept the requests to the browser using a proxy (as
>>> the OP suggests) requires rooting the device.
>>
>>
>> Feeding a WebView that's in your own app a URL like
>> "localhost:1234?src=www.foo.bar" requires rooting?

Not really an option, the web page is heavily Ajax based.

What would work though is, using a web proxy, that just passes most
locations through and would send blank images or a 404 for certain urls.
Not really elegant and causing more traffic than blocking adapting the
request on the phone, but it would be doable.

However my naive asumption, that an Android phone is capable of setting
/ using web proxies seems to be rather wrong.
After some googling I found out, that without rooting it seems to be
impossible to set a proxy for a wifi connection (seems to be doable
globally for mobile networks though)


>>
>> Processing the received HTML / CSS, replacing links requires rooting?
>>
>
> To do it properly, and identify all of the links statically would
> require a real considerable amount of analysis because of the
> funkiness of HTML. I previously suggested this approach to the OP,
> but I doubt that it will work (and it just *feels* wrong), and even if
> it does it's just abhorrently hacky.. So if he knows the structure of
> the page, then perhaps, maybe this would be an acceptable hack, but
> for the general case of writing a web browser, (as he says), hell no.


I knew Webkit via QT4 and am quite surprised about the rather reduced
feature set provided by the Google java API. That's really a pity and
I'm surprised these new features are only added for very new phones.
If shouldInterceptRequest() were suypported by older releases, then I
wouldn't even have to use proxies.


It seems I have to wait one year or more to get a newer phone or to bite
the bullet and root my phone.




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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate