Android Building Block


The fundamental component of android are as follows:.

Activity:.

An activity is responsible to showing the single screen in android app. It is a class . An actity is just like window in desktop application . When you create the android project the first activity is main-activity . The code is look like this

public class Main-Activity extends Activity { }


View:

The View class is responsible for creating the User Interface in android app . for example the EditText class is responsible for taking the input from user .It is the subclass of View .


Intent:

Intent is a message object that provide the facility to communicate between componenets in serveral ways . There are three fundamental uses as follows:

Starting An Activity:

An activity is responsible to showing the single screen in andoid app .You can start a new instance of an Activity by passing an Intent to startActivity(). The Intent describes the activity to start and carries any necessary data.

Intent i = new Intent(this, ActivityTwo.class); startActivity(i);

This code open the new activity (ActivityTwo) in your android app.

Start Service:

A service is a component that run in background and you can continue with your work like listning music,downloading files are example of Service .You can start a service to perform a one-time operation (such as downloading a file) by passing an Intent to startService().

Delivering Broadcast:

A broadcast is a message that any app can receive.You can deliver a broadcast to other apps by passing an Intent to sendBroadcast() or sendOrderedBroadcast().


Service:

A service is a component that run in background like downloadin file ,listning music etc .


Content Provider:

Content provider is responsible for data sharing between application.


Fragment:

Fragment is a modular section of an activity. An activity can add or remove the fragment at run time . A fragment has its own user interface according to your need you designed it .For example i want to click of a button the register page will open and on click of second button it will open the login page on the same activity .This can be done by fragment .


Menifestfile.xml:

It is the very important file in android app.It contains all the essential inforamtion about your android app like which app first launch it will be decided by Menifest.xml file . All the permission you need to write here like if you want to work with internet than you need to write the permission in menifestfile .


Android Virtual Device:

It is called AVD . It is used to run the android application in machine with out need of mobile or tablet etc . It is fully virtual .

Click here for video of android building block and pls subscribe and like my videos thanks.

Smiley face                     Smiley face