Please correct me If I am wrong :
1) A Service is used to perform long tasks in background. A service runs in the UI thread so if there comes a long task then it may freeze our UI. A service will continue to run independent of application as long as we tell it to stop.
2) An IntentService on the other hand is used to perform short tasks in separate thread. It automatically terminates when it finishes its task.
What I have to do :
1) check for location every 5 seconds
2) if there is a change in location send it to server and Update the UI with new location values
What confuses me :
Should I use a Service or IntentService as I need to do it continuously after 5 seconds and does not want my UI thread to become unresponsive.
This app will be used to track a vehicle.