Saturday, August 7, 2021

What is the Core Building Blocks of Android?

The core building blocks or fundamental components of android are activities, views, intents, services, content providers, fragments and AndroidManifest.

Activity:

An activity is a class that represents a single screen in application.

View:

A view is the User Interface element such as button, label, text field etc. Anything that you see is a view.

Intent:

Intent is used to invoke components. It is mainly used to:

=> Start the service

=> Launch an activity

=> Display a web page

=> Display a list of contacts

=> Broadcast a message

=> Dial a phone call etc.

For Example:

    Intent intent=new Intent(Intent.ACTION_VIEW);  
    intent.setData(Uri.parse("https://moonyincoding.blogspot.com"));  
    startActivity(intent);   

Service:

Service is a background process that can run for a long time. 

Content Provider:

Content Providers are used to share data between the applications. 

Fragment:

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

AndroidManifest

It contains informations about activities, content providers, permissions etc.

No comments:

Post a Comment

A Simple Data Binding Example

  Step-1: Enable data binding to android project ADD below line to your app level build.gradle file. android {     buildFeatures {        ...