Tag Archives: Basics


Android Application has a unique and very easy workflow what does it mean that , whenever a developer develops a android application. He has to follow the work Flow of android application.Whenever we extend Activity in our Java file it imports android.app.activity class

How Activity of an android application transit between one Activity to another Activity.Lets explore –

As we can see the below diagram according to http://developer.android.com/  , Activity life cyle has 7 main methods in which our Activity is transit within.

lifecycle of activity

Let’s take a glance of Activity life cycle and understand how it works- Simple definition and implementations-

1) . onCreate() –  This method calls whenever Activity is first created. This is First method invoked in which we do our coding like setContentView(R.layout.activity_main).

import android.os.Bundle;  
import android.app.Activity;  
import android.app.AlertDialog;  
import android.content.DialogInterface;  
import android.view.Menu;  
public class MainActivity extends Activity {  
    protected void onCreate(Bundle savedInstanceState) {  

2). onStart() – This method is called when Activity is becoming visible to user and eventually user is able to see the App , as you can see the Activity image above . onCreate immediately calls onStart().

3). onResume() – This method is invoked after onStart() method , It called whenever activity is interacting with the users continuously .

4). onPause() – This method is invoked whenever Activity goes in Pause state like during music if call comes then music player goes in pause state.

5). onStop() – This method is invoked when Activity is no longer interacting with the user.

6). onRestart() – This Activity invoked whenever after Activity is stopped and priority is to start.

7). onDestroy() – This methods invoked whenever our Activity is destroyed .User exit the Application.

According to official website of android i.e http://developer.android.com/training/basics/activity-lifecycle/index.html example of Activitylife cycle  .This source code you can download

Download code

Output –






for more query and suggestions do post here :p Happy coding folks!


Android componet

Android is depends upon 8 main components i.e.  Activity,View,Intent,Broadcast Receiver,Content Provider,Services,Fragments etc. I am going to explain simply and further implementation i’ll show you later.Lets explore –

Activity :  Activity is Class of Android library which is like panel , Frame Awt  window of Java . At one time the screen of device we see is called Activity is performing.

View : View in Android is something which mean all those widgets we see in an Android app like Button,TextView,EditText etc.

Intent : Intent in Android is a Component which is responsible to bring values from one Activity to another and vice – versa .

Intent intent = new Intent(getApplicationContext(),Next.class);

Broad Cast Receiver : 

broadcast receiver (short receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event are notified by the Android run time once this event happens.

For example : applications can register for the ACTION_BOOT_COMPLETED system event which is fired once the Android system has completed the boot process.

Content Provider : Content Provider Component supplies  information from one app to another app within the device. Content Providers allows you to centralize database and many application can access it.

Service : Service is a component in Android which allows to have background process like Music Player is running on Mobile Device then immediately one of your friend calls so Music Player Activity goes on Background and Call Activity comes in front .


Fragment : Fragment is small chunk of User – Interface (UI) . Means at a time if we press on one view its result shows on within the same Activity.




Android Software stack  contains linux kernel, native libraries (middleware), Android Runtime, Application Framework and Applications.

Linux kernel is responsible for device drivers, power management, resource access etc. OS tasks.

On the top of linux kernel, their are Native libraries such as WebKit, OpenGL, FreeType, SQLite, Media, C runtime library (libc) etc. Sqlite is Android local database. All the library functions of device is in this sections.

The WebKit library is responsible for browser support, SQLite is for database, FreeType for font support, Media for playing and recording audio and video formats.

The main Android API’s are UI (User Interface), telephony, resources, locations, Content Providers (data) and package managers.

Android architecture


What is an Android Operating System ? Android as you know is an operating system in which all of our Applications Runs. Android O.S is Linux based operating system. Android is free ware and you can say it is open source , so user can use it freely . Android O.S made up of c,c++,JAVA . It can be thought of as a mobile operating system. But it is not limited to mobile only. It is currently used in various devices such as mobiles, tablets, televisions ,Watches etc.

Android and Its Feature

  1. Anyone can customize the Android Platform.
  2. There are a lot of mobile applications that can be chosen by the consumer.
  3. It provides many interesting features like weather details, opening screen, live RSS (Really Simple Syndication) feeds etc.
  4. It provides support for messaging services(SMS and MMS), web browser, storage (SQLite), connectivity (GSM, CDMA, Blue Tooth, Wi-Fi etc.), media, handset layout etc.

Android Application Categories

  • Entertainment
  • Tools
  • Communication
  • Productivity
  • Personalization
  • Music and Audio
  • Social
  • Media and Video
  • Travel and Local etc.

History of Android is very nice to heard.The Version names of android ranges from A to J currently, such as Aestro, Blender, Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwich,Jelly Bean and KitKat :

Initially, Andy Rubin founded Android Inc in Palo Alto, California, United States in October, 2003.
In 17th August 2005, Google acquired android Incorporation. Since then, it is in the subsidiary of Google Inc.
The key employees of Android Incorporation are Andy Rubin, Rich Miner, Chris White and Nick Sears.
Originally intended for camera but shifted to smart phones later because of low market for camera only.
Android is the nick name of Andy Rubin given by coworkers because of his love to robots.
In 2007, Google announces the development of android OS.
In 2008, HTC launched the first android mobile.

android versions