SlideShare a Scribd company logo
1 of 14
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

What's hot

Android: Intent, Intent Filter, Broadcast Receivers
Android: Intent, Intent Filter, Broadcast ReceiversAndroid: Intent, Intent Filter, Broadcast Receivers
Android: Intent, Intent Filter, Broadcast ReceiversCodeAndroid
 
Intents in Android
Intents in AndroidIntents in Android
Intents in Androidma-polimi
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - AndroidWingston
 
Broadcast Receivers in Android
Broadcast Receivers in AndroidBroadcast Receivers in Android
Broadcast Receivers in Androidma-polimi
 
Android activities & views
Android activities & viewsAndroid activities & views
Android activities & viewsma-polimi
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介easychen
 
Android - Intents and Broadcast Receivers
Android - Intents and Broadcast ReceiversAndroid - Intents and Broadcast Receivers
Android - Intents and Broadcast ReceiversMingHo Chang
 
Day 4: Android: Getting Active through Activities
Day 4: Android: Getting Active through ActivitiesDay 4: Android: Getting Active through Activities
Day 4: Android: Getting Active through ActivitiesAhsanul Karim
 
Android apps development
Android apps developmentAndroid apps development
Android apps developmentMonir Zzaman
 
Application Frameworks - The Good, The Bad & The Ugly
Application Frameworks - The Good, The Bad & The UglyApplication Frameworks - The Good, The Bad & The Ugly
Application Frameworks - The Good, The Bad & The UglyRichard Lord
 

What's hot (18)

Android: Intent, Intent Filter, Broadcast Receivers
Android: Intent, Intent Filter, Broadcast ReceiversAndroid: Intent, Intent Filter, Broadcast Receivers
Android: Intent, Intent Filter, Broadcast Receivers
 
Android components
Android componentsAndroid components
Android components
 
Intents in Android
Intents in AndroidIntents in Android
Intents in Android
 
Android Basics
Android BasicsAndroid Basics
Android Basics
 
Android Components
Android ComponentsAndroid Components
Android Components
 
Android UI Fundamentals part 1
Android UI Fundamentals part 1Android UI Fundamentals part 1
Android UI Fundamentals part 1
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - Android
 
Broadcast Receivers in Android
Broadcast Receivers in AndroidBroadcast Receivers in Android
Broadcast Receivers in Android
 
Android activities & views
Android activities & viewsAndroid activities & views
Android activities & views
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介
 
Android session 2
Android session 2Android session 2
Android session 2
 
Android session 3
Android session 3Android session 3
Android session 3
 
Android session 1
Android session 1Android session 1
Android session 1
 
Android - Intents and Broadcast Receivers
Android - Intents and Broadcast ReceiversAndroid - Intents and Broadcast Receivers
Android - Intents and Broadcast Receivers
 
Day 4: Android: Getting Active through Activities
Day 4: Android: Getting Active through ActivitiesDay 4: Android: Getting Active through Activities
Day 4: Android: Getting Active through Activities
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Application Frameworks - The Good, The Bad & The Ugly
Application Frameworks - The Good, The Bad & The UglyApplication Frameworks - The Good, The Bad & The Ugly
Application Frameworks - The Good, The Bad & The Ugly
 
Activity
ActivityActivity
Activity
 

Similar to Android Bootcamp Tanzania: android manifest

Hello android world
Hello android worldHello android world
Hello android worldeleksdev
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2Vivek Bhusal
 
android notes for bachelor of technology.pptx
android notes for bachelor of technology.pptxandroid notes for bachelor of technology.pptx
android notes for bachelor of technology.pptxVishwaRahul
 
Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & ...
Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & ...Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & ...
Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & ...Eng Teong Cheah
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android AppsGil Irizarry
 
Advance Android application development workshop day 3
Advance Android application development workshop day 3Advance Android application development workshop day 3
Advance Android application development workshop day 3cresco
 
Synapseindia android apps introduction hello world
Synapseindia android apps introduction hello worldSynapseindia android apps introduction hello world
Synapseindia android apps introduction hello worldTarunsingh198
 
Android Apps Development Basic
Android Apps Development BasicAndroid Apps Development Basic
Android Apps Development BasicMonir Zzaman
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development PracticesRoy Clarkson
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in androidMahmudul Hasan
 
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & Menus
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & MenusLearn Xamarin Absolute Beginners - Permissions, Building the App GUI & Menus
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & MenusEng Teong Cheah
 
Android Application that makes use of RSS Feed.pptx
Android Application that makes use of RSS Feed.pptxAndroid Application that makes use of RSS Feed.pptx
Android Application that makes use of RSS Feed.pptxvishal choudhary
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principlesHenk Laracker
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentAly Abdelkareem
 

Similar to Android Bootcamp Tanzania: android manifest (20)

Android Development Basics
Android Development BasicsAndroid Development Basics
Android Development Basics
 
Android Programming.pptx
Android Programming.pptxAndroid Programming.pptx
Android Programming.pptx
 
Hello android world
Hello android worldHello android world
Hello android world
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2
 
android notes for bachelor of technology.pptx
android notes for bachelor of technology.pptxandroid notes for bachelor of technology.pptx
android notes for bachelor of technology.pptx
 
Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & ...
Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & ...Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & ...
Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & ...
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
Advance Android application development workshop day 3
Advance Android application development workshop day 3Advance Android application development workshop day 3
Advance Android application development workshop day 3
 
Ch2 first app
Ch2 first appCh2 first app
Ch2 first app
 
Synapseindia android apps introduction hello world
Synapseindia android apps introduction hello worldSynapseindia android apps introduction hello world
Synapseindia android apps introduction hello world
 
Android Apps Development Basic
Android Apps Development BasicAndroid Apps Development Basic
Android Apps Development Basic
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development Practices
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in android
 
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & Menus
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & MenusLearn Xamarin Absolute Beginners - Permissions, Building the App GUI & Menus
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & Menus
 
Android Application that makes use of RSS Feed.pptx
Android Application that makes use of RSS Feed.pptxAndroid Application that makes use of RSS Feed.pptx
Android Application that makes use of RSS Feed.pptx
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principles
 
Android Froyo
Android FroyoAndroid Froyo
Android Froyo
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Unit2
Unit2Unit2
Unit2
 

More from Denis Minja

Android Bootcamp Tanzania:Monetization
Android Bootcamp Tanzania:MonetizationAndroid Bootcamp Tanzania:Monetization
Android Bootcamp Tanzania:MonetizationDenis Minja
 
Android Bootcamp Tanzania:Costech mobile bootcamp monetazation
Android Bootcamp Tanzania:Costech mobile bootcamp monetazationAndroid Bootcamp Tanzania:Costech mobile bootcamp monetazation
Android Bootcamp Tanzania:Costech mobile bootcamp monetazationDenis Minja
 
Android Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intentsAndroid Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intentsDenis Minja
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidDenis Minja
 
Costech mobile bootcamp 2
Costech mobile bootcamp 2Costech mobile bootcamp 2
Costech mobile bootcamp 2Denis Minja
 
Android Bootcamp Tanzania:Overview of android platform
Android Bootcamp Tanzania:Overview of android platformAndroid Bootcamp Tanzania:Overview of android platform
Android Bootcamp Tanzania:Overview of android platformDenis Minja
 
Android Bootcamp Tanzania:Publishing android application
Android Bootcamp Tanzania:Publishing android applicationAndroid Bootcamp Tanzania:Publishing android application
Android Bootcamp Tanzania:Publishing android applicationDenis Minja
 

More from Denis Minja (7)

Android Bootcamp Tanzania:Monetization
Android Bootcamp Tanzania:MonetizationAndroid Bootcamp Tanzania:Monetization
Android Bootcamp Tanzania:Monetization
 
Android Bootcamp Tanzania:Costech mobile bootcamp monetazation
Android Bootcamp Tanzania:Costech mobile bootcamp monetazationAndroid Bootcamp Tanzania:Costech mobile bootcamp monetazation
Android Bootcamp Tanzania:Costech mobile bootcamp monetazation
 
Android Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intentsAndroid Bootcamp Tanzania:intents
Android Bootcamp Tanzania:intents
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_android
 
Costech mobile bootcamp 2
Costech mobile bootcamp 2Costech mobile bootcamp 2
Costech mobile bootcamp 2
 
Android Bootcamp Tanzania:Overview of android platform
Android Bootcamp Tanzania:Overview of android platformAndroid Bootcamp Tanzania:Overview of android platform
Android Bootcamp Tanzania:Overview of android platform
 
Android Bootcamp Tanzania:Publishing android application
Android Bootcamp Tanzania:Publishing android applicationAndroid Bootcamp Tanzania:Publishing android application
Android Bootcamp Tanzania:Publishing android application
 

Recently uploaded

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 

Recently uploaded (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 

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

  1. {}