Saturday, February 11, 2012

How to Modify the AndroidManifest

In previous tutorials we have reminded you to modify the manifest file and we have gotten a lot of questions about how to do it. Here is the general answer.

As you know, our tool of choice (IDE) to create Android apps is Eclipse.
So here is how you can do it step by step. [Note: If you don't use Eclipse then you just have to modify the AndroidManifest.xml file in your application]

1. In your package explorer tab (In the image to the left you) click on the AndroidManifest.xml
2. In the main window you will see a set of tabs at the bottom  (blue in the image. We find it easier (but also more prone to mistakes) to modify the .xml file directly, so click on that tab.
3. Now, all you have to do is update it to your needs. The most common problem is to change the activity, so in this example you can swap <activity ..... > .... </activity>  with the new one.

In short, two of the most important tags are:

  • Activity - describe the different activities your app contains and settings for them
  • Permissions - describe which features your application wishes to use that are not normally included (internet access for example)

If you want to know more about the manifest and what each of the fields means you can find more information  from the official android documentation here.

We hope this helps, we will be bringing new material soon if you have any suggestions then write a comment, send us an email or find us on twitter.

No comments:

Post a Comment