Pillars of Android



                                                                    

The important key players of Android
  • Activities
  • Services
  • Content providers
  • Intents
  • Broadcast Receivers
  • SQLite Connectivity

 Activities:

Activities are graphical user interface (GUI) that displays information’s and respond to user actions.
In simple, when we click something and opening something is called as an Activity.  Let me show some diagrammatically representation

                  

if you see the title bar of the image is Phone call and Contact…i.e Phone Call is an Activity which opens the Contact list Activity when user press the Pick from contact button. In Android all the Main class is an Extends to Activity
In Android the Activity acts as a STACK.

Let I illustrate it,
When you surfing in internet, by that time you received  a mail notification, if you click the notification it opens your Gmail account beyond when you reading your mail , you get message notification, when you click the notification, it opens your message inbox and  you read that message.
When we press back button which will close first?
Message will be closed first because it is the last activity that user views, so it get closed.. then again user press back button then Gmail is closed..

                                                                      


Services:

Services are run in background of an android application.
Let‘s taken an example,
                                                                                                                                                                 |
                                                                                                                                                  
Explanation:

You create a service to waiter for a deliver’s your food
The waiter  sends yours order to chef
Back ground service (you doesn’t know how the food is prepares in kitchen)
When the chef made your food,  then  waiter  starts his service and delivered the food item to you

Let‘s take an another example


Explanation:
  1. You  create an Alarm service at 6:30 am
  2. The Alarm service sends your service  request to System clock
  3. The system clock  is back ground service which triggers your alarm service when it reaches at 6:30 am
  4. Then the Alarm service starts( i.e. Ringing) and invokes you



Content provider:

Content providers are used to share and manage the application database. It’s shares within the application.

For an example:
You create an application which makes a call, when you selecting the phone contacts.
Explanation:
  1. You create an application which is third party application
  2. Using your application ,your  making   a call by selecting  the  phone contacts ….since phone contacts are native application
  3. So the Content of phone contacts (native application) provides it database to your application (third party).



Intent:

Intents are Message passing Framework. It’s used to starts or passes the data to Activity, Service and Receivers. Using Intent we can start’s another application.
For example

To eat an ice cream you move from your home to ice cream parlor i.e. you switching from one Activity to another in order to achieve your Intent.



Broadcast Receivers:

Broadcast Receivers are receiving the broadcast events. Its automatically starts an application to respond to incoming intents.
For example:




So the broadcast receivers are seeking for incoming events when its receives an incoming intents then it triggers it’s action.
Let take another example:
In SMS application, the SMS broadcast receiver seeking for receiving SMS, when its gets any receiving SMS it creates a message notification in title bar.



SQLite:
It’s used to stores the application data.
It is more powerful database tool and used in Android, iphone mobile devices.
It’s a open source, light weight and server-less database. 





  I  lightly explained  about the above things..but my later post I will explain how to implement those in codes.

Comments