In many of the articles I have written, the AndroidManifest.xml file has appeared in some way. Well, it's a very important part of the Android application, so I'm going to gather all the information and experience I have to write about “The Manifest".
When you create a new android application in your favorite IDE (better using Eclipse for now, in other articles I will write about how to configure another IDE to work with Android), we will have the AndroidManifest.xml in our project folder. It's automatically generated by Eclipse, so we don't have to bother about creating it by ourselves. Let's have a look at the file, inside of it, you will find something that looks like this:
As the main element we have the “manifest" tag, then, inside of it we have other elements, like “application", “uses-sdk" and “uses-permission".
This is the most simple AndroidManifest file you will find, in larger applications, this file could have lots of code lines, we will see why.
The AndroidManifest file is the configuration file of our application, here we set the Activities we are going to use (and how are they going to be used), the services we are going to set up in the Application, the version of the SDK we are using (this is a new feature in the 1.5 Cupcake version), and which permissions the application needs to make it work.
These are the most important elements, from my point of view, of the AndroidManifest file. There are lots more, but for now, we will focus on these 3:
Application, Permissions and Version