Monday, July 23, 2018

Android Manifest

AndroidManifest.xml – must in every app – stored in root of project hierarchy – Nodes for each component as defined above – Also Permissions – Meta data like Icon, version number, Theme etc. – Hardware screen/ 
platform requirements. By default all apps are installed on internal storage, however we may specify installation on external storage in the manifest tag as an attributeinstallLocation with values preferExternal or auto (If installed on external storage, app will stop when connected to PC as mass storage device to copy files).

Tags in Manifest File:

1.       <manifest></manifest> => Root Level
2.       <uses-sdk android:minSdkVersion =”6” android:targetSdkVersion=”15” />
minSdkVersion: Lowest version of JDK that includes the API you have used. Default value is 1.
Eg. minSdkVersion=”4”, means you are telling it should work on all devices with min version 4 and it should not work on any devices with lesser version
So you cannot install it on device with sdk less than 4, also if sdk greater than 4, and u install successfully, app may crash if you have used some API which needs a higher SDK version. So it must be assigned judiously.
targetSdkVersion: Specify the platform on which you did development and testing. No need to apply any forward or backward compatibility changes on this particular version. Best to update target SDK of your app to newest stable release, even though if you are not using any new APIs because you may get some internal UI improvements.
maxSdkVersion: Upper limit your are supporting, app wont be visible on Google Play for other newer devices. Unnecessary to specify it. And it is ignored during installation after 2.0.1 version. (API level 6)
3.       <uses-configuration> => Specify input devices, not necessarily needed, except games with special keyboards
4.       <uses-feature> => Any hardware required like Audio, Bluetooth, NFC, Camera, Microphone, Sensors, Location, Telephony, USB, Wi-fi etc.
5.       <uses-permission>
6.       <application> specify icon, title, theme, name etc for app, only one such tag allowed.
7.       <activity> 1 such tag for every activity, It has name and label as attributes.
8.       <intent-filter> it is sub tag of activity tag to specify intents that can be used to start this activity.

No comments:

Post a Comment

Near by App

https://drive.google.com/file/d/0B2ag35s4X53Eb2pSQVI1SzNudE0/view