Wednesday, June 12, 2013

Activity Lifecycle concepts for Offshore Android Developers

Apps have led to the immense popularity of smartphones. Google play store has millions of apps about anything and everything. This has helped offshore android developers with a lot of opportunities to create, upload and market their own apps. Android SDK makes it easier for developers to build applications by using preset components offered by Google. The 4 main components that can be used are:
  • Activity
  • Services
  • Content Providers
  • Broadcast receivers
Each of these components has a unique entry point and can also be used for various other functions. Activity component lets an offshore android developer create views with functions for a user to perform any task. Let’s explore the activity component lifecycle and all its stages: Programmers May Like To Read: Points To Keep in Mind While Create Android App.


An activity essentially has four stages which are as follows:

  • Active: As the name suggests, it refers to an activity that is running at the moment on the foreground.
  • Paused: An activity is paused when it is still alive and yet partially covered by another activity on the foreground. Such an activity can be resumed by closing the front activity.
  • Stopped: If an activity is completely covered by another activity, it is stopped and yet alive. User can resume it closing the front activity or else the system can close it to free resources when necessary.
  • Destroyed: When an activity is paused or stopped by the user and is killed by the memory, it is in the destroyed state. After this stage an activity can only be resumed by restarting it.

The entire lifecycle of activity can be explained as:

  • Activity launched –
  • onCreate() – UI creation and initialization
  • onStart() – Activity still not active
  • onResume() – Activity is visible and running
  • onPause() – Another activity is being called on top of this activity; all data must be saved as system might kill this
  • activity in need of additional resources.
  • onRestart() – If the activity is resumed by the user before being killed by the system
  • onDestroy() – Activity is either killed by the system or the user for use at another time
    This Post may be useful for companies which are working for Enterprise Mobile Application Development. This information may be helpful to create android mobile applications and iPhone applications.

    No comments:

    Post a Comment

    Software Solutions & Tips

    Tags / Labels of Blog