Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between activities and services?



What is the difference between activities and services?..

Answer / tisha

Activities and services are two fundamental components in Android, each serving distinct purposes within an Android application:

1. Activities:
- An Activity represents a single screen with a user interface. It is a visual component where users can interact and perform actions.
- Activities are typically used to present a UI to the user, receive input, and navigate to other activities.
- They have a user interface, visible to the user, and are generally associated with a screen.
- The activity lifecycle methods (onCreate, onStart, onResume, onPause, onStop, onDestroy) manage the behavior of an activity as it moves through different states.

2. Services:
- A Service is a background task that can perform long-running operations without a UI. It operates independently of any user interface.
- Services are often used to handle tasks that need to continue running even when the application is in the background or not actively interacting with the user.
- They don't have a user interface and run in the background.
- Services can run indefinitely and perform operations such as downloading files, playing music, or checking for updates.
- Common service lifecycle methods include onStartCommand, onBind, and onDestroy.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Android OS Interview Questions

Explain me what is armv7?

0 Answers  


How do I check my android os version?

0 Answers  


Can android version be updated?

0 Answers  


What is a toast?

0 Answers  


Which is the method you need to use to post a notification to be shown in the status bar?

0 Answers  


What are the different phases of the Activity life cycle in Android?

0 Answers   B-Ways TecnoSoft,


What are intents?

0 Answers  


Define the exceptions of android?

0 Answers  


Explain me what is the android application architecture?

0 Answers  


What are location providers in android?

0 Answers  


Can you deploy executable JARs on Android? Which packaging is supported by Android?

1 Answers  


What is tween animation?

0 Answers  


Categories