Differentiate Activities from Services?

1 votes
Harsh kumar srivastava asked 09-Jan-2018 in Technology by Harsh kumar srivastava

Differentiate Activities from Services?

1 Answer

0 votes
Prateek sharma answered 09-Jan-2018 by Prateek sharma

activities are the crucial part of an android application. activities work together to form a whole working application. since activities are independent of each other but they work together to form an application. activity can be extended from the Activity class. an activity interact directly with the user.

services work in the background for the long-running application. for example, while listening to songs the user can browse internet easily. they do not have the user interface. a service can be implemented as a subclass of Service. services do not directly interact with the user as they work in the background.