tags:

views:

173

answers:

1

I'm interested in whether there is a way to monitor HTTP(S) traffic on an Android phone? What I would like to do is to be able to retrieve all URLs that have been accessed on the phone's browser. I thought that there would be a browser intent for that, but have not seen anything - given I'm green, maybe I just did not know where to look?

I followed the question and answer here, but it works only for hyperlinks which were clicked by the user, however I need to catch all URLs - including the ones typed in by the user. Basically I need to know about every single URL that was opened in the web browser.

Can I register some kind of a handler with the browser?

Is something like that feasible at all?

A: 

I'm not very sure how (or if) you can use this (never used it myself), but it might be worth a look: Browser.getAllVisitedUrls(ContentResolver cr)

Felix
I thought about it, but it's unreliable, I think - I would have to poll it constantly and the user may be able to clear the browser history/cache just in time before my service polls it for data. There should be a better way.
Pawel Krakowiak
No, there shouldn't be any way to spy on the user.
Felix
There should, with the user's knowledge and upon their request. I have a use for this, I'm just wondering about what's possible from the technical standpoint.
Pawel Krakowiak
If you're worried about the user clearing the history before your application accesses it, just tell him not to.
Felix