add background android service for timer and fix a bug