I worked on an app which does all that stuff.
The windows version of this:
https://play.google.com/store/apps/details?id=com.apadmi.analyzeme.android&hl=en_GB
It uses fiddler as an intermediate for all web browsing to work out what you're doing.
When you install it, all your internet traffic is directed through fiddler.
It also detects programs starting and closing.
The app comes in several pieces but the UI is wpf using a bit of an odd start up technique so you just see a tray icon until you click on it.
Realitymine supply that software to marketing companies so you could maybe just buy it off the shelf.