Home Tutorials Hints & Tips

Getting Started in Android Development

Part 3 - The Android Manifest File

Every Android app must have a manifest file. This file is an XML file that is stored in the root directly of the app. It must have the exact name AndroidManifest.xml. The Android manifest file stores essential information about the app. This information includes:

The Android Manifest file is used by the app and the Android markets to garner this information.

As we progress through the series of tutorials we will keep coming back the Manifest file.  The initial file on creating this project has reference to the package name.


It also has reference to the only activity as yet. This is the Main Activity. The Java file MainActivity.java is referenced in the activity name field.


There is also an intent filter associated with this activity. The category of the intent filter is:

category android:name="android.intent.category.LAUNCHER"

The key word LAUNCHER means that this activity will be started when the app is first loaded. All other activities will need to be called from within the app and these have the keyword DEFAULT. We will come back to this later in the series.

The Android version name and number are worth noting at this stage. Android Studio does not add these into the Manifest file so I added them manually. The version name is is simply a free text field the developer can assign. It is not used by the app, but is displayed in market place to indicate the version of the app to anybody interested in downloading it.

The Android version code does have significance. This is an integer number. This is what the Android operating system uses to mange upgrades. An app must have a version code the same or higher than the existing app for the upgrade to be successful. The market places will also put safeguards in place if you offer an upgrade with a lower version code.

Another subject that we will visit later is assigning permissions to the manifest. If an app requires Internet access then this needs to be assigned as a permission the manifest file. Without it, access to the Internet is not possible.

There is much more to look at in the manifest and we will revisit  it several times later on in the series. For now, the initial androidManifest.xml file should look similar to the one below:

Download Download tutorial set 1

Privacy and Cookies Disclaimer Copyright
© 2015 - 2018 North Border Tech Training All rights reserved