Android Service LifeCycle Tutorial.

source