Google News
logo
Android - Interview Questions
what is meant by Activities?
Activities are the part of the mobile app which the user can see and interact with.
 
For Example, if you open an SMS app which has multiple activities like create new SMS, add a contact from the address book, write the content in the SMS body, send SMS to the selected contact, etc.
 
Activity keeps a track of the following :
 
* Keeps track of what a user is currently looking for in an app.
* Keeps a track of previously used processes, so that the user can switch between ongoing process and previous process.
* It helps to kill the processes so that the user can return to their previous state

An activity is implemented as a subclass of Activity class as shown below :
 
Public class MyActivity extends Activity
{

}

 

Advertisement