Understanding the android manifest

The android manifest is fairly simple to understand, I am going to outline the main important parts which have to be covered.

1. Every page which is added should go in the order which you wish them to display in the app. Failure to do so will cause them to not appear in the correct order.

2. Within the first activity there should be an intent-filter. This is for the first only.

3. The pages which are being added should be linked via a Java file this is the name which you will add not the XML page name.

4. You shouldn’t delete anything which is there when you first open the manifest.

Finding the android manifest. 

The Android Manifest is located on the left hand side bar.

Image

Android manifest location

 

What parts of the manifest mean

At the top you will see package. This is linking to your app.

Image

The next part you will see is application. This will include a label and icon. This can be updated to what you want to have placed there. it will only accept a string and images. The string will be displayed on every page of the app. The default one is title of the app. The image is displayed on the top of every page within the app as well, so this could be the apps logo or something like that. It is currently the android logo.

Image

The activity is where the Java files are added into, which are linked to the XML pages. These should be added into the manifest in order as that is the way it will display them. For example the most common one would be a splash screen.

Untitled 2

 

intent-filter, this is added in by default. You should not change it. It is setting that activity to be  main one and it is also going to launch first when the app is launched.

Untitled 2

 

I am now going to add in my own page/activity which I have created to be the next page. Using the method as shown before I open the activity tags. I then write “android:name=” I then place the name of the Java file which I have linked the XML file too. i have also chosen to include an android:label= which will be displayed at the top of the page in the from of text. This could be useful if for example you wanted to write Game menu at the top of the page.

Untitled 2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s