What is Android Manifest



manifest file, android manifest file, manifest xml, android learning hub, androidlearninghub

Android manifest file (AndroidManifest.xml) is a file that contains all the information of your android application i.e. what is your package name, what permissions the app needed, what are the android versions this app uses and many more. It is an XML file and store data in XML tags. You can find more details about the manifest file in the official Android Developer Site 

In Android Studio you can find the android manifest file in this location. While in Eclipse you can find it in a different location.

Below is the snippet of a normal android manifest file.
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.praval.healthfreak">

<!-- To access internet --> 
<uses-permission android:name="android.permission.INTERNET" /> 
<!-- To access accounts configured on device --> 
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> 
<!-- To use account credentials --> 
<uses-permission android:name="android.permission.USE_CREDENTIALS" />

<application 
android:allowBackup="true" 
android:icon="@mipmap/ic_launcher" 
android:label="@string/app_name" 
android:supportsRtl="true" 
android:theme="@style/AppTheme"> 

<activity android:name=".MainActivity"> 
<meta-data android:name="com.google.android.gms.version" 
android:value="@integer/google_play_services_version" /> 
</activity> 

<activity android:name=".Splash"> 
<intent-filter> 
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 
</activity> 

<activity android:name=".Form"></activity> 
<activity android:name=".IndexPage" 
android:label="@string/title_activity_index_page" 
android:theme="@style/AppTheme.NoActionBar" /> 

<activity android:name=".FoodEntry" /> 
<activity android:name=".NewIndex" /> 
<activity android:name=".ScrollingActivity" 
android:label="@string/title_activity_scrolling" 
android:theme="@style/AppTheme.NoActionBar">
</activity> 

<activity android:name=".WatchVideos"></activity> 
</application>
</manifest>

Below is the brief description of all tags used in the manifest file.

  • <manifest> is parent tag to define manifest xml file.
  • <activity> is used to define an interface in the application.
  • <intent-filter> is used to define type of activity. (For example, if action is used as MAIN and category as LAUNCHER then it will act as a first of your application)
  • <uses-permission> is used to define what permissions your app needed. (for example, you want to access the Internet or contact list of the android phone)
Follow Android Learning Hub for more Android related news and articles.

Comments