The manifest tag can include nodes that define the application components, security settings, test classes, and requirement that make up your application. The following list gives a summary of the available manifest sub-node tag and provides an XML how to use tags.
SDK
This nodes enables you to define a minimum and maximum SDK version that must be available on a device for your application function properly, and target SDK for which it has been combination of minSDKVersion, maxSDKVersion, and targetSDKVersion attributes, respectively.
Application
A manifest can contain only one application node. During development you should include a debuggable attribute set to true to enable debugging.
The application node also acts as container for the Activity, Service, Content Provider, and Broadcast Receiver nodes that specify the application components.
Activity
An activity tag is required for every Activity within your application. Use the android: name attribute to specify the Activity class name. Trying to start an Activity that̢۪s not defined in the manifest will throw a runtime exception.
Service
A with the activity tag, add a service tag for each Service class used in your application .Service tags also support intent-filter child tags to allow late runtime binding.
A simple AndroidManifest.xml file looks
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.javatportal.new" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/title_activity_main" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
0 comments:
Post a Comment