FUNDAMENTALS AND STRUCTURE
NAVEENA E.
ANDROID CORE BUILDING BLOCKS
An Android Component Is Simply A Piece Of
Code That Has A Well Defined Life Cycle E.G.
Activity, Receiver, Service Etc.
The Core Building Blocks Or Fundamental
Components Of Android Are Activities, Views,
Intents, Services, Content Providers, Fragments
And Androidmanifest.Xml.
Android components
ACTIVITY
An activity is a class that represents a single
screen. It is like a Frame in AWT.
VIEW
A view is the UI 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.
SERVICE
Service is a background process that can run for a
long time.
There are two types of services local and remote.
Local service is accessed from within the application
whereas remote service is accessed remotely from
other applications running on the same device.
CONTENT PROVIDER
Content Providers are used to share data between
the applications.
BROADCAST RECEIVER
• A broadcast receiver (receiver) is an Android
component which allows you to register for
system or application events. All registered
receivers for an event are notified by the
Android runtime once this event happens.
FRAGMENT
Fragments Are Like Parts Of Activity. An
Activity Can Display One Or More Fragments On The
Screen At The Same Time.
ANDROIDMANIFEST.XML
It contains informations about activities,
content providers, permissions etc. It is like the
web.xml file in Java EE.
• The AndroidManifest.xml file contains
information of your package, including
components of the application such as activities,
services, broadcast receivers, content providers
etc.
• It performs some other tasks also:
• It is responsible to protect the application to
access any protected parts by providing the
permissions.
• It also declares the android api that the
application is going to use.
• It lists the instrumentation classes. The
instrumentation classes provides profiling and
other informations. These informations are
removed just before the application is published
etc.
• This is the required xml file for all the android
application and located inside the root directory.
ELEMENTS OF THE ANDROIDMANIFEST.XML
FILE
<manifest>
manifest is the root element of the AndroidManifest.xml
file. It has package attribute that describes the package
name of the activity class.
<application>
application is the subelement of the manifest. It
includes the namespace declaration. The commonly
used attributes are of this element
are icon, label, theme etc.
<activity>
activity is the subelement of application and represents an
activity that must be defined in the AndroidManifest.xml file.
It has many attributes such as label, name, theme,
launchMode etc.
<intent-filter>
intent-filter is the sub-element of activity that describes the
type of intent to which activity, service or broadcast receiver
can respond to.
<action>
It adds an action for the intent-filter. The
intent-filter must have at least one action
element.
<category>
It adds a category name to an intent-filter.
APPLICATION STRUCTURE
<MANIFEST XMLNS:ANDROID="HTTP://SCHEMAS.ANDROID.COM/APK/RES/ANDROID"
PACKAGE="COM.JAVATPOINT.HELLO"
ANDROID:VERSIONCODE="1"
ANDROID:VERSIONNAME="1.0" >
<USES-SDK
ANDROID:MINSDKVERSION="8"
ANDROID:TARGETSDKVERSION="15" />
<USES-PERMISSION ANDROID:NAME="ANDROID.PERMISSION.SEND_SMS"/>
<APPLICATION
ANDROID:ICON="@DRAWABLE/IC_LAUNCHER"
ANDROID:LABEL="@STRING/APP_NAME"
ANDROID:THEME="@STYLE/APPTHEME" >
<ACTIVITY
ANDROID:NAME=".MAINACTIVITY"
ANDROID:LABEL="@STRING/TITLE_ACTIVITY_MAIN" >
<INTENT-FILTER>
<ACTION ANDROID:NAME="ANDROID.INTENT.ACTION.MAIN" />
<CATEGORY ANDROID:NAME="ANDROID.INTENT.CATEGORY.LAUNCHE
R" />
</INTENT-FILTER>
</ACTIVITY> </APPLICATION>
</MANIFEST>
ASSETS
assets directory is more like a filesystem and
provides more freedom to put any file you
would like in there. You then can access each
of the files in that system as you would when
accessing any file in any file system through
Java. This directory is good for things such as
game details, dictionaries,...etc. Hope that
helps.
LAYOUT
Layout are used to define the actual
UI(User interface) of our application. It holds all
the elements (i.e. views) or the tools that we want
to use in our application. For
example, TextView, Button and other UI
elements.
TYPES OF LAYOUT
• LINEAR LAYOUT
• RELATIVE LAYOUT
• TABLE LAYOUT
• FRAMELAYOUT
• ABSOLUTE LAYOUT
ANDROID R.JAVA FILE
Android R.Java Is An Auto-generated File By
aapt (Android Asset Packaging Tool) That
Contains Resource Ids For All The Resources Of
Res/ Directory.
If You Create Any Component In The
Activitymain.Xml File, Id For The Corresponding
Component Is Automatically Created In This File.
This Id Can Be Used In The Activity Source File
To Perform Any Action On The Component.
USER COMPONENTS
In android user interface is mainly built using
View and ViewGroup objects.
View objects are the basic units of user
interface and also View object is a data
structure whose properties store the layout
parameters and content for a specific
rectangular area of the screen.
Requests a permission that the application must
be granted in order for it to operate correctly.
Permissions are granted by the user when the
application is installed (on devices running
Android 5.1 and lower) or while the app is
running (on devices running Android 6.0 and
higher).
USES-PERMISSION
USES-SDK
This element is used to specify the API
Level, not the version number of the SDK
(software development kit) or Android platform.
The API Level is always a single integer. You
cannot derive the API Level from its associated
Android version number
android:minsdkversion
android:targetsdkversion
android:maxsdkversion
USES OF API LEVEL IN ANDROID
• It lets the Android platform describe the
maximum framework API revision that it
supports
• It lets applications describe the framework API
revision that they require
• It lets the system negotiate the installation of
applications on the user's device, such that
version-incompatible applications are not

More Related Content

PPTX
Android application-component
PDF
Android Basic Components
PPTX
Android apps development
PDF
Android UI Fundamentals part 1
ODP
Ppt 2 android_basics
PDF
Android Components
PPTX
PDF
04 user interfaces
Android application-component
Android Basic Components
Android apps development
Android UI Fundamentals part 1
Ppt 2 android_basics
Android Components
04 user interfaces

What's hot (20)

PPT
View groups containers
PPT
android layouts
PDF
Android Lesson 2
PPT
Day 4: Android: Getting Active through Activities
PPTX
Android Widget
PDF
Android development - Activities, Views & Intents
PDF
[Android] Intent and Activity
PPTX
PDF
Android ui layout
PPTX
04 activities - Android
PPTX
Create an android app for database creation using.pptx
PPT
Day 4: Android: UI Widgets
PPT
Multiple Activity and Navigation Primer
PPTX
Android Life Cycle
PDF
Lecture 3 getting active through activities
ODP
Android App Development - 02 Activity and intent
PPTX
Android App Development (Basics)
PPT
Android Bootcamp Tanzania: android manifest
PPTX
Android Tutorials : Basic widgets
PDF
Android session 2
View groups containers
android layouts
Android Lesson 2
Day 4: Android: Getting Active through Activities
Android Widget
Android development - Activities, Views & Intents
[Android] Intent and Activity
Android ui layout
04 activities - Android
Create an android app for database creation using.pptx
Day 4: Android: UI Widgets
Multiple Activity and Navigation Primer
Android Life Cycle
Lecture 3 getting active through activities
Android App Development - 02 Activity and intent
Android App Development (Basics)
Android Bootcamp Tanzania: android manifest
Android Tutorials : Basic widgets
Android session 2
Ad

Similar to Android components (20)

PPTX
mobile application development -unit-3-
DOCX
Android Tutorial For Beginners Part-1
PDF
Android Development
PPTX
Lec-3-Mobile Application Development.pptx
PPT
Android application development for TresmaxAsia
PPTX
Android application development fundamentals
PDF
Lecture3
PPTX
UNIT5newpart1pptx__2024_11_13_09_51_59 (1).pptx
PPTX
Introduction & App Structure
PPT
Android Presentation for fundamental.ppt
PPT
Part 2 android application development 101
PPTX
GDG School Android Workshop
PPT
introductiontoandroiddevelopment (2).ppt
PDF
Android Jump Start
PPTX
Android beginners David
PDF
Training Session 2 - Day 2
PPT
Android application structure
PDF
Android Bootcamp
PDF
Android Workshop_1
PPTX
Intro to android (gdays)
mobile application development -unit-3-
Android Tutorial For Beginners Part-1
Android Development
Lec-3-Mobile Application Development.pptx
Android application development for TresmaxAsia
Android application development fundamentals
Lecture3
UNIT5newpart1pptx__2024_11_13_09_51_59 (1).pptx
Introduction & App Structure
Android Presentation for fundamental.ppt
Part 2 android application development 101
GDG School Android Workshop
introductiontoandroiddevelopment (2).ppt
Android Jump Start
Android beginners David
Training Session 2 - Day 2
Android application structure
Android Bootcamp
Android Workshop_1
Intro to android (gdays)
Ad

Recently uploaded (20)

PPTX
Chapter 5: Probability Theory and Statistics
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
STKI Israel Market Study 2025 version august
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Architecture types and enterprise applications.pdf
PDF
August Patch Tuesday
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
Chapter 5: Probability Theory and Statistics
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
A review of recent deep learning applications in wood surface defect identifi...
Developing a website for English-speaking practice to English as a foreign la...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
STKI Israel Market Study 2025 version august
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Group 1 Presentation -Planning and Decision Making .pptx
WOOl fibre morphology and structure.pdf for textiles
Final SEM Unit 1 for mit wpu at pune .pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Architecture types and enterprise applications.pdf
August Patch Tuesday
Benefits of Physical activity for teenagers.pptx
Getting Started with Data Integration: FME Form 101
1 - Historical Antecedents, Social Consideration.pdf
Hindi spoken digit analysis for native and non-native speakers
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Univ-Connecticut-ChatGPT-Presentaion.pdf

Android components

  • 2. ANDROID CORE BUILDING BLOCKS An Android Component Is Simply A Piece Of Code That Has A Well Defined Life Cycle E.G. Activity, Receiver, Service Etc. The Core Building Blocks Or Fundamental Components Of Android Are Activities, Views, Intents, Services, Content Providers, Fragments And Androidmanifest.Xml.
  • 4. ACTIVITY An activity is a class that represents a single screen. It is like a Frame in AWT. VIEW A view is the UI element such as button, label, text field etc. Anything that you see is a view.
  • 5. 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.
  • 6. SERVICE Service is a background process that can run for a long time. There are two types of services local and remote. Local service is accessed from within the application whereas remote service is accessed remotely from other applications running on the same device. CONTENT PROVIDER Content Providers are used to share data between the applications.
  • 7. BROADCAST RECEIVER • A broadcast receiver (receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event are notified by the Android runtime once this event happens.
  • 8. FRAGMENT Fragments Are Like Parts Of Activity. An Activity Can Display One Or More Fragments On The Screen At The Same Time. ANDROIDMANIFEST.XML It contains informations about activities, content providers, permissions etc. It is like the web.xml file in Java EE.
  • 9. • The AndroidManifest.xml file contains information of your package, including components of the application such as activities, services, broadcast receivers, content providers etc. • It performs some other tasks also: • It is responsible to protect the application to access any protected parts by providing the permissions.
  • 10. • It also declares the android api that the application is going to use. • It lists the instrumentation classes. The instrumentation classes provides profiling and other informations. These informations are removed just before the application is published etc. • This is the required xml file for all the android application and located inside the root directory.
  • 11. ELEMENTS OF THE ANDROIDMANIFEST.XML FILE <manifest> manifest is the root element of the AndroidManifest.xml file. It has package attribute that describes the package name of the activity class. <application> application is the subelement of the manifest. It includes the namespace declaration. The commonly used attributes are of this element are icon, label, theme etc.
  • 12. <activity> activity is the subelement of application and represents an activity that must be defined in the AndroidManifest.xml file. It has many attributes such as label, name, theme, launchMode etc. <intent-filter> intent-filter is the sub-element of activity that describes the type of intent to which activity, service or broadcast receiver can respond to.
  • 13. <action> It adds an action for the intent-filter. The intent-filter must have at least one action element. <category> It adds a category name to an intent-filter.
  • 15. <MANIFEST XMLNS:ANDROID="HTTP://SCHEMAS.ANDROID.COM/APK/RES/ANDROID" PACKAGE="COM.JAVATPOINT.HELLO" ANDROID:VERSIONCODE="1" ANDROID:VERSIONNAME="1.0" > <USES-SDK ANDROID:MINSDKVERSION="8" ANDROID:TARGETSDKVERSION="15" /> <USES-PERMISSION ANDROID:NAME="ANDROID.PERMISSION.SEND_SMS"/> <APPLICATION ANDROID:ICON="@DRAWABLE/IC_LAUNCHER" ANDROID:LABEL="@STRING/APP_NAME" ANDROID:THEME="@STYLE/APPTHEME" >
  • 16. <ACTIVITY ANDROID:NAME=".MAINACTIVITY" ANDROID:LABEL="@STRING/TITLE_ACTIVITY_MAIN" > <INTENT-FILTER> <ACTION ANDROID:NAME="ANDROID.INTENT.ACTION.MAIN" /> <CATEGORY ANDROID:NAME="ANDROID.INTENT.CATEGORY.LAUNCHE R" /> </INTENT-FILTER> </ACTIVITY> </APPLICATION> </MANIFEST>
  • 17. ASSETS assets directory is more like a filesystem and provides more freedom to put any file you would like in there. You then can access each of the files in that system as you would when accessing any file in any file system through Java. This directory is good for things such as game details, dictionaries,...etc. Hope that helps.
  • 18. LAYOUT Layout are used to define the actual UI(User interface) of our application. It holds all the elements (i.e. views) or the tools that we want to use in our application. For example, TextView, Button and other UI elements. TYPES OF LAYOUT • LINEAR LAYOUT • RELATIVE LAYOUT • TABLE LAYOUT • FRAMELAYOUT • ABSOLUTE LAYOUT
  • 19. ANDROID R.JAVA FILE Android R.Java Is An Auto-generated File By aapt (Android Asset Packaging Tool) That Contains Resource Ids For All The Resources Of Res/ Directory. If You Create Any Component In The Activitymain.Xml File, Id For The Corresponding Component Is Automatically Created In This File. This Id Can Be Used In The Activity Source File To Perform Any Action On The Component.
  • 20. USER COMPONENTS In android user interface is mainly built using View and ViewGroup objects. View objects are the basic units of user interface and also View object is a data structure whose properties store the layout parameters and content for a specific rectangular area of the screen.
  • 21. Requests a permission that the application must be granted in order for it to operate correctly. Permissions are granted by the user when the application is installed (on devices running Android 5.1 and lower) or while the app is running (on devices running Android 6.0 and higher). USES-PERMISSION
  • 22. USES-SDK This element is used to specify the API Level, not the version number of the SDK (software development kit) or Android platform. The API Level is always a single integer. You cannot derive the API Level from its associated Android version number android:minsdkversion android:targetsdkversion android:maxsdkversion
  • 23. USES OF API LEVEL IN ANDROID • It lets the Android platform describe the maximum framework API revision that it supports • It lets applications describe the framework API revision that they require • It lets the system negotiate the installation of applications on the user's device, such that version-incompatible applications are not