Forbrukslån | Sähkösopimus | Beste Kredittkort Reise | Strømleverandør | Brannalarm Pris 2017 | Beste Forsikring | Billigste Mobilselskaper | Taksering av Bolig
Blog

Tutorial 3 Android Basic AndroidManifest.xml file Introduction

Welcome to the third phase. Those who have not seen the previous two episodes, they can be seen.
Today we’ll talk about a file guratbapurna. Some of the files on your application before work is started. The name of the file AndroidManifest.xml. I hope the next phase sikhabo XML. It will become more clear. Today, too many things to be clear pasibala. Let’s see what it was.
Let’s first look at a picture,

 

android manifest

We are all familiar with the film. Once you install the Google Play Store app when it comes normally. Here is what this app on your phone will access. Suppose that you made an application to read SMS. SMS can access. It should be pointed out that this is the app you need permission. Once you install your application after the user can see the image above. The question is how will this work? The answer AndroidManifest.xml file! Just a line to the <uses-permission android: name = “android.permission.READ_SMS” /> will be required to write! Not fun?

Okay, let’s, let’s take a look at the whole file. Then I’ll tell you one by one, what works in any part.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="utf-8"?>
    package="com.androidlime.myapp"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="21" />
 <uses-permission android:name="android.permission.READ_SMS"/>
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

For example, there is the HTML tag? Our XML and the like. Tag works with. If the inside of the tag, attribute to yegulake. In the next article, I’ll detail of craving them.

Let’s hope this file post-mortem,

1
<?xml version="1.0" encoding="utf-8"?>

The top line / label is, it says that it is an XML file.

1
2
3
4
    package="com.androidlime.myapp"
    android:versionCode="1"
    android:versionName="1.0" >

It says that it’s a tag at the top of the AndroidManifest.xml file. Then see, package. Java package where all our files. Here’s how it will be called.

The next two lines awful important. We see that ayaplisanera update. This new version updates. The new version know what I mean? This change these two lines. When my application to be able to release the first two lines will be similar. Hold, then I have added a new feature. So will a new version. And we, android: versionCode = “2” will and android: versionName = “1.1” it can. Not fun?

1
2
3
<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="21" />

Tag at the top of the user’s sdk. What’s working? What is the Android version of the API is called. android: minSdkVersion = “8” means that your application can use the API to the user’s phone 8 will be the minimana. Which is phroyo. 9. If you had, you install fixed or they can use those at the top of Android. android: targetSdkVersion = “21” means, if the API is 1, then the best for your application. The API has been at the top of the new features have been added Android. What features do you use in your application, users can get the features you need on any Android minimana based on android: minSdkVersion set.

 

1
<uses-permission android:name="android.permission.READ_SMS"/>

The top line is the permissions line. This means that if you want to install the application, I will give permission to read SMS! When will the app permission to use it.

1
2
3
4
5
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

This application tag. It is inside Activity, Intent. Yegula now, as you see, android: icon = “@ drawable / ic_launcher” icon of the application. android: label = “@ string / app_name” is the name or level. android: theme = “@ style / AppTheme is the theme. There are a lot of themes. Such as light, dark. This is one of them.

 

1
2
3
<activity
           android:name=".MainActivity"
           android:label="@string/app_name" >

 

Activity tag it. I told you before, usually one each file activity Java file. android: name = “. MainActivity” My activity is the file name. If you think another Java file? And it is the activity? Then too, if the file AndroidManifest.xml <activity’ll write tag.

1
2
3
4
<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

Data is taken to be the work of Intent. Here are two lines, <action android: name = “android.intent.action.MAIN” /> and <category android: name = “android.intent.category.LAUNCHER” /> It is the application of open looks as though he’s done MainActivity the. Activity may have said before, a lot of applications. Which is to say that if you open the app will start with these two lines.

<Manifest> or <application> We have started this tyagagula. Look at the next, they are finished. Respectively </ manifest> and </ application> tag.

 

This until today.

There is little hope to understand the problem.

If you have any questions, please comment.

Comments

comments

About the author

Toriqul Islam Tusher

বলার মত কিছু নাই!

Leave a Comment