What is an activity in android ?
Activity :
One of the fundamental building block of Android app development is Activity. An activity represents a single screen in Android app with which user can perform a single, focused task such as dial the phone, take a photo, send an email, or view a map. Activities are usually presented to the user as full-screen windows.
Activity Stack to manage the Activity :
Activities in the system are managed as activity stacks. Each time a new activity starts, the previous activity is stopped, but the system preserves the activity in a stack (the “back stack”). When a new activity starts, that new activity is pushed onto the back stack and takes user focus. The back stack abides to the basic “last in, first out” stack mechanism, so, when the user is done with the current activity and presses the Back button, that current activity is popped from the stack (and destroyed) and the previous activity resumes.
All activities are work together to form a cohesive user experience in an app, each activity is only loosely coupled to the other activities. Typically, there are minimal dependencies between the activities in an app. Activities often start up activities belonging to other apps. For example, a browser app might launch the Share activity of a social-media app.
Android activities are started or activated with an intent. Intents are asynchronous messages that we can can use in our activity to request an action from another activity (or other app component).
In our next article we will discuss about Create and Start an Activity and The Activity Life-cycle, so stay tuned with us .
For more details : Activity in android
Thank you 

Comments
Post a Comment