Components of Android

A component is a piece of code that has a well-defined life cycle like Activity, Intent, Service etc.

The fundamental components of Android are activities, views, intent, service, content providers, fragments and AndroidManifest.xml.

Activity is a class that represents a single screen. It is like a Frame in AWT.

View is the UI element such as Button, TextView, Label etc. Anything that you see on display screen is View.

Intent is used to invoke the components. It is mainly used to:
  • Start the service
  • Launch an activity
  • Display a webpage
  • Broadcast a message
  • Dial a phone call etc.
Service is a background process that runs for a long time.
There are two types of services local and remote. Local service is accessed from within the application and remote service is accessed remotely from another application running on the same device.

Content Providers are used to share data between the applications.

Fragments are part of an activity. An activity can display one or more fragments on the screen at the same time.

AndroidManifest.xml contains information about activities, content providers, services, permissions etc. It is like web.xml file in J2EE.

Android Virtual Device(AVD)
It is the device that used to run, debug and test an android application without the need of mobile or tablet. It can be created in different configurations to emulate different types of real devices. It also known as an Emulator.

Comments

Popular posts from this blog

SQLiteDatabase (Without SqliteOpenHelper class)

Set current date to Button and Datepicker dialog

MVC Architecture in Android