AndroidManifest.xml is a powerful file in the Android platform that allows you to describe the functionality and requirements of your application to Android. However, working with it is not easy. Xamarin.Android helps to minimize this difficulty by allowing you to add custom attributes to your classes, which will then be used to automatically generate the manifest for you.
AndroidManifest.xml is generated as part of the build process, and the XML found within Properties/AndroidManifest.xml is merged with XML that is generated from custom attributes. The resulting merged AndroidManifest.xml resides in the obj subdirectory; for example, it resides at obj/Debug/android/AndroidManifest.xml for Debug builds. The merging process is trivial: it uses custom attributes within the code to generate XML elements, and inserts those elements into AndroidManifest.xml.
The manifest lets you define the structure and metadata of your application, its components, and its requirements.
A typical manifest node is shown in the following XML snippet:
[ ... manifest nodes ... ]
The tag includes nodes that define the application components, security settings, test classes, and requirements that make up your application. The following list gives a summary of the available node tags, and an XML snippet demonstrating how each one is used:
The minimum SDK version specifies the lowest version of the SDK that includes the APIs you have used in your application. If you fail to specify a minimum version, one will be assumed and your application will crash if it attempts to access APIs that aren‘t available on the host device.
The maximum 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 higher platform release. It‘s good practice not to set the maximum SDK value unless you know your application will definitely not work on newer platform releases.
The supported SDK version is not equivalent to the platform version and cannot be derived from it. For example, Android platform release 2.0 supports the SDK version 5. To find the correct SDK version for each platform use the table at:
Free Demo for Corporate & Online Trainings.