Home > DeveloperSection > Interviews > Differentiate Activities from Services.

Posted on    January-23-2015 10:23 PM

 Mobile Development Android 
 1 Answer(s)
  565  View(s)
Rate this:

Tanuj Kumar

Total Post:30

Posted on    January-23-2015 11:23 PM

It's not just about having UI. Services have their separate uses like it runs in the background until you tell it to stop. It means it can fetch data from APIs or images in the background thread and can pass this data to your activity. I know android has much better options for doing these tasks but you can do almost anything which needs to be run on a background thread. Another use of service comes in my mind is running a service in background which waits for particular action like incoming call, system boot, etc.

Modified On May-08-2016 11:46:24 PM

Don't want to miss updates? Please click the below button!

Follow MindStick