ANDROID MANIFEST
Android Manifest xml File






Every application must have an A ro id
nd
M nife s t. x m l file
a
(with precisely that name) in its root directory.
The manifest presents essential information
about the application to the Android system.


information the system must have before it can run
any of the application's code.
Android Manifest xml File
Android Manifest xml File











<action>
<activity>
<activity-alias>
<application>
<category>
<data>
<grant-uri-permission>
<instrumentation>
<intent-filter>
<manifest>













<meta-data>
<permission>
<permission-group>
<permission-tree>
<provider>
<receiver>
<service>
<uses-configuration>
<uses-library>
<uses-permission>
<uses-sdk>
AndroidManifest.xml


Applications should declare everything needed
on the the AndroidManifest.xml file …



One AndroidManifest.xml for application ..



What's contained in it?






Pe rm is s io ns
Hw a nd Sw re s o urc e s us e d by the
A p lic a tio n
p
A tivitie s
c
I nt-filte rs
nte
5
Android Manifest xml File






The manifest is made up of a root manifest ta g
with a package attribute set to the project’s
package.
It usually includes an x m lns : a nd ro id attribute
that supplies several system attributes used
within the file.
The m a nife s t ta g includes nodes that define the
application components, security settings, and
test classes that make up your application.
Activities and
AndroidManifest.xml






An Android application can be composed of
multiple Activities …
Each activity should be declared in the file:
AndroidManifest.xml
Add a child element of <application>:
<application>
<activity android:name=".MyActivity" />
<activity android:name=”.SecondActivity" />
</application>

7
AndroidManifest.xml
example
<?xml version="1.0" encoding="utf-8"?>
<manifest>
<application android:icon="@drawable/icon.png" >
<activity
android:name="com.example.project.MyActivity"
android:label="@string/label">
</activity>
</application>
</manifest>

8
Android Manifest xml File








Available manifest node tags, and an XML snippet
demonstrating how each one is used:
A p lic a tio n: A manifest can contain only one application
p
node.
It uses attributes to specify the metadata for your
application (including its title, icon, and theme).
It also acts as a container that includes the Activity,
Service, Content Provider, and Broadcast Receiver tags
used to specify the application components.
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloandroid"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".HelloAndroid"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
<manifest>


The manifest tag has the following attributes:


xmlns ; the name of the namespace (android) and
where the DTD for the xml parser is located.



package ; the name of the java package for this
application (must have at least two levels).



android:version ; the version code for this version of the
app.



android:versionName ; The version name (for
publishing)
<activity>


Child tag of <manifest>
Need one <activity> tag for each activity of the
application



Attributes:





android:name; the name of the activity, this will be
used as the name of the Java file and the
resulting class.



android:label; a string that we will be able to
programmatically retrieve the activity name at run
time.
<intent-filter>









Child tag of <activity>
First, what’s an intent? In OO-speak an intent is a message sent
from one program to another (message dispatcher) to tell the
system what to do next.
Typically an intent consists of two parts; an action and the data
that that action is supposed to use to do it.
When you select an icon on the main page the intent is to run the
app associated with that icon.
The tag is used to construct an android.content.IntentFilter object
to handle a particular android.content.Intent
Launcher






When you create a new application using the
Android SDK tools.
The stub activity that's created for you
automatically includes an intent filter that
declares the activity responds to the "main"
action.
It should be placed in the "launcher" category.

More Related Content

PDF
Android Components & Manifest
PDF
Events and Listeners in Android
ODP
Ppt 2 android_basics
PDF
Android Basic Components
PPTX
Android apps development
PDF
Android development - Activities, Views & Intents
PPTX
Android Life Cycle
PDF
[Android] Intent and Activity
Android Components & Manifest
Events and Listeners in Android
Ppt 2 android_basics
Android Basic Components
Android apps development
Android development - Activities, Views & Intents
Android Life Cycle
[Android] Intent and Activity

What's hot (18)

PDF
Android: Intent, Intent Filter, Broadcast Receivers
PPTX
Android components
PDF
Intents in Android
PPT
Android Basics
PDF
Android Components
PDF
Android UI Fundamentals part 1
PPTX
04 activities - Android
PDF
Broadcast Receivers in Android
PDF
Android activities & views
PPT
Android应用开发简介
PDF
Android session 2
PDF
Android session 3
PDF
Android session 1
PDF
Android - Intents and Broadcast Receivers
PPT
Day 4: Android: Getting Active through Activities
PPTX
Android apps development
KEY
Application Frameworks - The Good, The Bad & The Ugly
DOCX
Activity
Android: Intent, Intent Filter, Broadcast Receivers
Android components
Intents in Android
Android Basics
Android Components
Android UI Fundamentals part 1
04 activities - Android
Broadcast Receivers in Android
Android activities & views
Android应用开发简介
Android session 2
Android session 3
Android session 1
Android - Intents and Broadcast Receivers
Day 4: Android: Getting Active through Activities
Android apps development
Application Frameworks - The Good, The Bad & The Ugly
Activity
Ad

Similar to Android Bootcamp Tanzania: android manifest (20)

PPTX
Android Programming.pptx
PPTX
Lec-3-Mobile Application Development.pptx
PPTX
Modul 2.pptxhelllojobbigtufytfythjgjhbknkjlnlk
PPTX
android notes for bachelor of technology.pptx
PDF
Advance Android application development workshop day 3
PDF
Training Session 2 - Day 2
PPT
Android lifecycle
PPT
Best android classes in mumbai
PDF
Unit 3 Android Manifest File.pdf Android Manifest File
PPTX
MDAD 3 - Basics of UI Applications
PPT
MD-IV-CH-ppt.ppt
PPT
Unit 2 in environment science and technology
PPT
Part 2 android application development 101
PPTX
Kotlin for Android App Development Presentation
PDF
android_mod_3.useful for bca students for their last sem
PDF
Introduction to Android Development
PDF
Introduction toandroid
PPTX
Android Studio development model and.pptx
PPTX
Mobile application development
PPT
Lecture-3.ppt
Android Programming.pptx
Lec-3-Mobile Application Development.pptx
Modul 2.pptxhelllojobbigtufytfythjgjhbknkjlnlk
android notes for bachelor of technology.pptx
Advance Android application development workshop day 3
Training Session 2 - Day 2
Android lifecycle
Best android classes in mumbai
Unit 3 Android Manifest File.pdf Android Manifest File
MDAD 3 - Basics of UI Applications
MD-IV-CH-ppt.ppt
Unit 2 in environment science and technology
Part 2 android application development 101
Kotlin for Android App Development Presentation
android_mod_3.useful for bca students for their last sem
Introduction to Android Development
Introduction toandroid
Android Studio development model and.pptx
Mobile application development
Lecture-3.ppt
Ad

More from Denis Minja (7)

PPTX
Android Bootcamp Tanzania:Monetization
PPTX
Android Bootcamp Tanzania:Costech mobile bootcamp monetazation
PPT
Android Bootcamp Tanzania:intents
PPT
Android Bootcamp Tanzania:understanding ui in_android
PPTX
Costech mobile bootcamp 2
PPTX
Android Bootcamp Tanzania:Overview of android platform
PPTX
Android Bootcamp Tanzania:Publishing android application
Android Bootcamp Tanzania:Monetization
Android Bootcamp Tanzania:Costech mobile bootcamp monetazation
Android Bootcamp Tanzania:intents
Android Bootcamp Tanzania:understanding ui in_android
Costech mobile bootcamp 2
Android Bootcamp Tanzania:Overview of android platform
Android Bootcamp Tanzania:Publishing android application

Recently uploaded (20)

PPTX
20th Century Theater, Methods, History.pptx
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
Empowerment Technology for Senior High School Guide
PDF
Trump Administration's workforce development strategy
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
20th Century Theater, Methods, History.pptx
B.Sc. DS Unit 2 Software Engineering.pptx
202450812 BayCHI UCSC-SV 20250812 v17.pptx
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Weekly quiz Compilation Jan -July 25.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Chinmaya Tiranga quiz Grand Finale.pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Empowerment Technology for Senior High School Guide
Trump Administration's workforce development strategy
Unit 4 Computer Architecture Multicore Processor.pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
What if we spent less time fighting change, and more time building what’s rig...
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
AI-driven educational solutions for real-life interventions in the Philippine...
Environmental Education MCQ BD2EE - Share Source.pdf

Android Bootcamp Tanzania: android manifest

  • 2. Android Manifest xml File    Every application must have an A ro id nd M nife s t. x m l file a (with precisely that name) in its root directory. The manifest presents essential information about the application to the Android system.  information the system must have before it can run any of the application's code.
  • 4. Android Manifest xml File           <action> <activity> <activity-alias> <application> <category> <data> <grant-uri-permission> <instrumentation> <intent-filter> <manifest>            <meta-data> <permission> <permission-group> <permission-tree> <provider> <receiver> <service> <uses-configuration> <uses-library> <uses-permission> <uses-sdk>
  • 5. AndroidManifest.xml  Applications should declare everything needed on the the AndroidManifest.xml file …  One AndroidManifest.xml for application ..  What's contained in it?     Pe rm is s io ns Hw a nd Sw re s o urc e s us e d by the A p lic a tio n p A tivitie s c I nt-filte rs nte 5
  • 6. Android Manifest xml File    The manifest is made up of a root manifest ta g with a package attribute set to the project’s package. It usually includes an x m lns : a nd ro id attribute that supplies several system attributes used within the file. The m a nife s t ta g includes nodes that define the application components, security settings, and test classes that make up your application.
  • 7. Activities and AndroidManifest.xml    An Android application can be composed of multiple Activities … Each activity should be declared in the file: AndroidManifest.xml Add a child element of <application>: <application> <activity android:name=".MyActivity" /> <activity android:name=”.SecondActivity" /> </application> 7
  • 8. AndroidManifest.xml example <?xml version="1.0" encoding="utf-8"?> <manifest> <application android:icon="@drawable/icon.png" > <activity android:name="com.example.project.MyActivity" android:label="@string/label"> </activity> </application> </manifest> 8
  • 9. Android Manifest xml File     Available manifest node tags, and an XML snippet demonstrating how each one is used: A p lic a tio n: A manifest can contain only one application p node. It uses attributes to specify the metadata for your application (including its title, icon, and theme). It also acts as a container that includes the Activity, Service, Content Provider, and Broadcast Receiver tags used to specify the application components.
  • 10. AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.helloandroid" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".HelloAndroid" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
  • 11. <manifest>  The manifest tag has the following attributes:  xmlns ; the name of the namespace (android) and where the DTD for the xml parser is located.  package ; the name of the java package for this application (must have at least two levels).  android:version ; the version code for this version of the app.  android:versionName ; The version name (for publishing)
  • 12. <activity>  Child tag of <manifest> Need one <activity> tag for each activity of the application  Attributes:   android:name; the name of the activity, this will be used as the name of the Java file and the resulting class.  android:label; a string that we will be able to programmatically retrieve the activity name at run time.
  • 13. <intent-filter>      Child tag of <activity> First, what’s an intent? In OO-speak an intent is a message sent from one program to another (message dispatcher) to tell the system what to do next. Typically an intent consists of two parts; an action and the data that that action is supposed to use to do it. When you select an icon on the main page the intent is to run the app associated with that icon. The tag is used to construct an android.content.IntentFilter object to handle a particular android.content.Intent
  • 14. Launcher    When you create a new application using the Android SDK tools. The stub activity that's created for you automatically includes an intent filter that declares the activity responds to the "main" action. It should be placed in the "launcher" category.

Editor's Notes