140 likes | 329 Views
Introducing the Application Manifest. Nasrullah khan. Each android project includes a manifest file, AndroidManifest.xml, stored in the root of the project hierarchy,the manifest file lets you define the structure and metadata of you application,its components and its requirements.
E N D
Introducing the Application Manifest Nasrullah khan
Each android project includes a manifest file,AndroidManifest.xml,stored in the root of the project hierarchy,the manifest file lets you define the structure and metadata of you application,its components and its requirements
It includes nodes for each of the components(Activities,Services,Content Providers And Broadcast Receivers) that makes up the application,using Intent filters and permissions determine How they interact with each other/
<manifest> node tags • <uses-sdk> • <uses-configuration> • <uses-features> • <supports-screens> • <application> • <uses-permissions> • <permissions> • <instrumentation>
<uses-sdk> • This node lets you define a min,max,targetsdk version that must be availbale on a device in order for your application to function properly.the minimum SDK version specifies the lowest version of the SDK that include the APIs you have used in your application,your application will crash if it attempts to access the APIs that are not available on the host device. • The max SDK version lets you define an upper limit you are willing to support,your application will not be visible on the market for devices running a higer platform release.it is a good practice not to set the max SDK value unless you know your application will definitely not work on newer platform releases
Uses-configuration • Nodes to speify each combination of input mechanizm supported by your application.you can specify any combination of input devices that include • reqFiveWayNav:-specify true for this attribute if your require an input device capable of navigating up,down,left and right and of clicking the current selection.this includes both trackballs and D-pads • reqHardKeyboard:- • reqKeyboardType:-nokeys,qwerty,twelvekey or undefined • reqNavigation :-nonav,dpad,trackball,wheel,undefined • reqTouchScreen:-notouch,stylus,finger,undefined
Uses-features • <uses-feature> node to specify the each of the hardware features your application requires,this will prevent your application from being installed on a device that does not include a required hardware feature • If you require a camera android.hardware.camera • If you require a cmaer with auto focus androi.hardware.camera.autofocus Uses-feature node is also used to specify the the minimum version of OpenGL required by your applciation.