I have created a Service in my android application which starts automatically on BOOT_COMPLETE through BroadcastReceiver. And That is
Service
BOOT_COMPLETE
BroadcastReceiver
Write your handler code in onStartCommand. But remember, your service will be paused when device goes in "sleep mode".