Monday, August 25, 2014

Application Manifest

Application Manifest

The <manifest> tag includes nodes that define the
         application components
         security settings
         test classes
         requirements that make up your application

<manifest  xmlns:android=http://schemas.android.com/apk/res/android        
                package="com.my_domain.my_app"
                android:versionCode="1"                  used internally to compare application versions
                android:versionName="0.9 Beta">    specify a public version number that is displayed to users.

        <uses-sdk
                 android:minSdkVersion="4"
                 android:targetSdkVersion="5">
        </uses-sdk>

        <uses-configuration
                android:reqTouchScreen=["finger"]
                android:reqNavigation=["trackball"]
                android:reqHardKeyboard=["true"]
                android:reqKeyboardType=["qwerty"/>

         <uses-feature
                android:glEsVersion=" 0x00010001"
                android:name="android.hardware.camera" />

         <supports-screens
                  android:smallScreens=["false"]
                  android:normalScreens=["true"]
                  android:largeScreens=["true"]
                  android:anyDensity=["false"] />

         <application
                  android:icon="@drawable/icon"
                  android:theme="@style/my_theme"
                  android:name="MyApplication"
                  android:debuggable="true">

                  <activity android:name=".MyActivity" android:label="@string/app_name">
                           <intent-filter>
                                    <action android:name="android.intent.action.MAIN" />
                                    <category android:name="android.intent.category.LAUNCHER" />
                           </intent-filter>
                  </activity>

                  <service 
                            android:enabled="true" android:name=".MyService">
                  </service>

                  <provider 
                            android:permission="com.paad.MY_PERMISSION"
                            android:name=".MyContentProvider"
                            android:enabled="true"
                            android:authorities="com.paad.myapp.MyContentProvider">
                   </provider>

                   <receiver 
                            android:enabled="true"
                            android:label="My Intent Receiver"
                            android:name=".MyIntentReceiver">
                    </receiver>
          </application>

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

          <permission 
                    android:name="com.paad.DETONATE_DEVICE"
                    android:protectionLevel="dangerous"
                    android:label="Self Destruct"
                    android:description="@string/detonate_description">
          </permission>

          <instrumentation 
                    android:label="My Test"
                    android:name=".MyTestClass"
                    android:targetPackage="com.paad.aPackage">
          </instrumentation>

</manifest>

Manifest nodes

uses-configuration
Use uses-configuration nodes to specify each combination of input mechanisms supported by your application.

uses-feature
Use multiple uses-feature nodes to specify each of the hardware features your application requires.

supports-screens
the supports-screen node lets you specify the screen sizes your application can, and can’t, support

application
A manifest can contain only one application node.
It uses attributes to specify the metadata for your application (including its title, icon, and theme).
The <application> node also acts as a container that includes the
             Activity,
             Service,
             Content Provider,
             Broadcast Receiver

uses-permission
Uses-permission tags declare the permissions you’ve determined your application needs to operate properly
Permissions you include will be presented to the user before installation commences

permission 
Within the permission tag, you can specify the
         level of access the permission will permit (normal, dangerous, signature, signatureOrSystem),
         a label,
         an external resource containing the description that explains the risks of granting the specified permission

instrumentation 
Instrumentation classes provide a test framework for your application components at run time

No comments:

Post a Comment