CIMON
A Configurable Integrated Monitoring (CIMON) system for Android
... monitors which are represented by boolean expressions. These monitors can notify applications when a particular event or condition has occurred.
In addition to the monitoring service, there is an administration app, shown in the screenshots, which allows you to easily add new monitors.
For more complete information, check out the project homepage. The complete JavaDoc is available at the homepage. The source code is freely available and can be extended to include additional metrics.