Android Note (i) androidmanifest.xml

Source: Internet
Author: User

This is the configuration file for the entire Android project, and all four components defined in the program need to be registered in this file. You can also add permission declarations to your application in this file, or you can reassign the minimum and target versions of the program that you specified when you created the project.
There is a piece of code in Androidmanifest.xml:

 <activityandroid: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>

Filter is the meaning of filters, Intent-filter is mainly used to indicate activity, Service, broadcast reciver which three components can respond to which implicit intents. Each component can have one or more intent filter.
Action is an action test: if the action of the intent request matches an action in the Intent-filter, then the intent passes the Intent-filter action test.
If the specific action type is not specified in the intent request or intent-filter, the following two scenarios occur.
(1) If no action type is included in the Intent-filter, then no intent request can match this intent-filter;
(2) Conversely, if the action type is not set in the intent request, the intent request will pass intent-filter behavior test as long as the action type is included in the Intent-filter.
Category is a class test: The class in this instance is launcher, which indicates that the activity is a startup item.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android Note (i) Androidmanifest.xml

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.