Fundamental components of android application

This post is a one of some posts about android platform I will write to explore this platform and learn you(and me) developing android applications for mobiles and tablets devices. You don't have to own android mobile to create android application, what is you really need is a tool (Emulator) to test and debug your application.

You can refer to this post  where I showed how to prepare your machine to be able to create your android application. That post was written before releasing Ice Cream Sandwich version (android 4.x) but it does not matter, just you should download the latest version of all tools you have to install.

My reference for writing these posts is Pro Android 4 book.

In this post we will explore the key components of android framework which we must understand before delving into coding process.

views are user interface(UI) elements such as buttons, labels, text fields, or any other UI element. Views also can contain other views. Anything you see is a view.

Any android application contains at least one activity, each activity represent one screen in you application. An activity is a thing that helps user to do one thing (view, create, or editing data). An activity contains one or more views and also sometimes does not contain any view.

Fragments are like sub-activity and an activity can display one or more fragments on the screen at the same time. We use fragments when there are many functionality in one activity.

 It defines an intention to do something like starting a service, lunching an activity, or dial a phone number..etc. Intents also used by the system to notify your application of specific events. It can be explicit or implicit and you can provide specific information about what should handle the intention. Intents loosely couple the action and action handler.

Content Provider:
It is a standard mechanism for sharing data among mobile application on a device without exposing the underlying storage, structure and implementation. By using  content providers you can make your application use data from other applications.

It is a background process that can run for long time. There are two types of  services in android

  • Local service: that is only accessible by the application host it.
  • Remote service: the service that is accessed remotely by other applications on the same device(mobile or tablet).
like web.xml in J2EE and like web.config in ASP.Net, it defines the contents and behavior of your application. It lists all activities, services, permission, features of your application.

Android Virtual Device(ADV):
 it allows developers to test their application without need to android device. it can be created in various configuration to emulate different types of real devices.

In the next posts we will cover these components in more details.


Popular posts from this blog

Android : How to change progress bar color at runtime programmatically?

ASP.Net MVC : Conditional Validation using ValidationAttribute

How to fire RowCommand event of nested GridView?