Android Application Components

Application Components are the essential building blocks of an Android app. These factors are approximately coupled by the application manifest train AndroidManifest.xml that describes each element of the operation.

Basic Components

1. Activites

An activity in a class is considered as an entry point for stoner represent single screen.
One activity shows a new notification, another activity which reads dispatches and another which composes a new message.

An activity apply to extend the activity class in your class:

public class MainActivity extends Activity { 
    // code
}

2. Services

Handle the background processing associated with an operation.
It acts as an unnoticeable worker of our app. It keeps update data sources and conditioning. Also broadcasts intents and performs tasks when app aren’t active.

Extend the Services class in your sub-class:

public class MyService extends Services{
  // code
}

3. Content Providers

Handle data and database management issues.
It hides details of the database and can be use read and write private data of application which isn’t participated.

Extend Content Provider in your class:

public classProvider_Name extends ContentProvider { 
     public void onCreate(){}
}

4. Broadcast Receiver

Handle communication between android OS and app.
That responds to broadcast messages from another application. It can also deliver broadcasts to applications that aren’t running.

Extend Broadcast Receiver to your receiver:

public classBroadcast_Name extends BroadcastReceiver{ 
    public void onReceive( environment, intent){} 
}

Additional factors of Android Application

1. Intents

This is used for framework for communication between android factors. Also used for transferring data between different activities as start new service.

2. Widgets

Widgets are a designing and customization element. Whenever you see your device’s home screen, you can find several widgets like a timepiece, rainfall, etc. These widgets allow you to change the appearance of your home screen and truly allow easy access to some frequently wanted stuff.

Following are the types of widgets which we veritably frequently see in any device:

A. Control Widget

It allows you to control your application through the widget. For Example, your music players give you a customized widget to break, play, or stop the music without opening the operation.

B. Information Widget

There are several information widgets similar as time, date, rainfall, etc. It allows you to keep track of the required information.

C. Collection Widget

It shows you all your recent activities and provides you with faster access to which operations you might frequently use.
For Example, if we lately used a phone or WhatsApp, it consists of these two operations.

D. Hybrid Widget

It’s a widget having the features of all the below widgets. For Example, you can find all your recent apps, rainfall data, news feeds, and indeed still enforced music regulators to play or break your music in this widget.

3. Views

Views are the factors that are frequently used for designing and event handling purposes. therefore, views are part of both designing and rendering. Using the views, we can describe how an element will bear or interact with the user.
There are several views on android. The most common of them are as follows

EditText – used to take user inputs.
ImageView – used to display images.
Button – decide which event to perform by pressing the button.
CheckBox – selecting multiple options.
ImageButton – same as a button but has an image along with it.
Recycler View – It’s like a list displaying multiple data in the desired layout.
Nested Scroll View – allows the stoner to scroll horizontally or vertically.
Radio Button – allows the stoner to elect only one option from the available.
Text View – displays textbook on your layout.

4. Notifications

It alerts the stoner of any update or any new advertisement by the application providers. Notification can come on both focus or background of the app. So indeed if the app is inactive, you still would admit a announcement.
Using the Firebase Cloud Messaging tools, the application possessors can indeed shoot drive notifications on your device, which can be related to any creation or any critical updates.

For Example, Whenever someone dispatches you on your messaging operation, also incontinently you admit a notification.

5. Fragments

Fragments allow you to give multiple functionalities by creating a single activity. Using fractions, you can do several tasks on the same exertion itself. fractions are applicable and can be used for colorful activities if needed. The scrap is made of Views and View Pager.

For example, In WhatsApp, you can see that there’s an exertion that contains converse, status, and call as fractions. Using the same exertion, you can indeed sputter, keep status or call someone.

6. XML File

XML file makes up the layout for any android application. Using XML, we can produce colorful designs or layouts for our operation. XML indeed allows us to transfer data from the database to our layout file.

7. Resources

Resources store several effects in Android. Whether you need a particular font style, image, colors, robustness, or strings, all of these are stored in resources. coffers also allow you to put vector images in your android application.

8. APK Build

After the development is done, you can combine your code, resources, and lines in a one- unit called APK( Android Application Package). This package can be installed on your device by the Package Manager, and also the stoner can use that application.

Conclusion

The “Android Application Components” is now finished. I hope this article has provided you with some useful information.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories