How can I monitor and block traffic using a filter list of URL's?
I'm trying to create an app that monitors all incoming traffic and 开发者_开发技巧blocks it if required and if necessary, replace it with traffic from elsewhere. (preferably using a filter list made up of URL's) is there any possible way to do this? I have searched Google, and stack overflow and I have not been able to find anything relevant to my needs. thank you very much for any help in advance.
This will be tough. Android has no host file as such.
I assume you will not want to develop your own custom ROM (because there are custom ROMs that allow you to sniff and filter the packets going back and forth on an Android device).
Take a look at Broadcast Receivers. Broadcast Receivers are your best bet for that kind of functionality. They can intercept url browser calls, phone calls, SMS, etc. (assuming no other Broadcast Receivers are present with the same or higher priority).
精彩评论