I have implemented my requirement with research and help from the G+ Android Developer community. You can see the implementation at the below links from GitHub.
And based on my experiences, I am giving the answers as below.
- It is ok to start a service on BOOT_COMPLETE, but better wait some time (10 seconds) so that we don't load the system as many other services may get started and as such.
- We can unregister the contentObserver in the onDestroy method of the service
- I was able to do 'registerContentObserver' on a UI thread without any issues?
https://github.com/midhunhk/message-counter/tree/master/v2/MessageCounter/src/com/ae/apps/messagecounter/observers https://github.com/midhunhk/message-counter/tree/master/v2/MessageCounter/src/com/ae/apps/messagecounter/services