Day   1.1 android manifest file - 12092012
Upcoming SlideShare
Loading in...5
×
 

Day 1.1 android manifest file - 12092012

on

  • 327 views

 

Statistics

Views

Total Views
327
Views on SlideShare
327
Embed Views
0

Actions

Likes
0
Downloads
27
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Day   1.1 android manifest file - 12092012 Day 1.1 android manifest file - 12092012 Presentation Transcript

  • Mr. Pritesh N. Patel Assistant Professor MCA ISTAR –V.V. Nagar 1Mr. Pritesh N. Patel
  • Enforcing Application System Requirement  Used to specify any system requirements necessary for application to run properly.  For e.g. application might required that handset have GPS, compass or camera.  It also specify that application relied upon Bluetooth APIs available within Android SDK and version.  This information is used while installing the .apk.  Also used to filter application by features. 2Mr. Pritesh N. Patel
  •  What we can configure…  Android SDK version supported by application.  Android platform features used by application.  Android Hardware configuration required by application.  Screen Size and pixel densities supported by application.  External libraries that are linked to apllication. 3Mr. Pritesh N. Patel
  •  Targeting Specific SDK version  Android devices run different versions of android platform.  Cheap device may run older version while expensive device may run latest version.  We can specify version in AMF using…  <uses-sdk> tag and have following attribute  minSdkVersion Specify lowest API level to support for backward compatibility.  targetSdkVersion Specify optimum API level support.  maxSdkVersion Specify highest API level support for future compatibility. 4Mr. Pritesh N. Patel
  • Android SDK versions and there API levels 5Mr. Pritesh N. Patel
  • Example <uses-sdk android:minSdkVersion=“1” android:targetSdkVersion=“3” android:maxSdkVersion=“5” />  We rarely defined maxSdkVersion.  It is used to specify forward compatibility. 6Mr. Pritesh N. Patel
  • Enforcing Application Platform Requirement  Android devices have different hardware and software configurations. For e.g.  Some device may have built-in keyboards and may be software keyboard.  Some device may support 3D graphic or other may be little or none.  Android manifest file has several informational tags for flagging the system features and hardware configurations supported by an our android application. 7Mr. Pritesh N. Patel
  • Specifying Supported Input Methods <uses-configuration> tag is used to specify input methods and application supports. <uses-configuration android:reqHardKeyboard=“true” android:reqTouchScreen=“finger” /> <uses-configuration android:reqHardKeyboard=“true” android:reqTouchScreen=“stylus” /> 8Mr. Pritesh N. Patel
  •  Syntax <uses-configuration android:reqFiveWayNav=["true"|false"] android:reqHardKeyboard=["true“|"false"] android:reqKeyboardType=["undefined" | "nokeys" | "qwerty”| "twelvekey"] android:reqNavigation=["undefined" | "nonav" | "dpad” |"trackball“|"wheel"] android:reqTouchScreen=["undefined" | "notouch" | "stylus" |"finger"] /> 9Mr. Pritesh N. Patel
  • Specifying Required Device features <uses-feature> tag is used to specify android device feature which our application supports. The feature may be multitouch support or camera feature. E.g. <uses-feature android:name=“android.hardware.sensor.light” /> <uses-feature android:name=“android.hardware.sensor.proximity” /> 10Mr. Pritesh N. Patel
  • Specifying support Screen Size <supports-screens> tag is used to specify android device screen type which our application supports.  Screen Type in term of size may be small, normal and large.  Screen Type in term of pixel density may be low, medium and hidh E.g. <supports-screens android:smallScreens=“true” android:normalScreens=“true” android:largeScreens=“true” android:anydensityScreens=“true” /> 11Mr. Pritesh N. Patel
  • Syntax 12Mr. Pritesh N. Patel
  • Working with external libraries <uses-library> tag is used to specify additional packages used by our application apart from default packages like android.app. E.g. <uses-library android:name=“com.sharedlibrary.shareStuff” /> It is generally used to link Google APIs. 13Mr. Pritesh N. Patel
  • Registering Activities 14  Each activity within the application must be defined within android manifest file in <activity> tag.  It is mandatory to specify activity in a manifest file otherwise it will not launch or run. E.g. <activity android:name=“HelloWorldActivity“ android:icon="@drawable/icon" android:label="@string/app_name" /> While using package <activity android:name=“.HelloWorldActivity” /> or <activity android:name=“mypack.Sample.HelloWorldActivity” /> Mr. Pritesh N. Patel
  • Syntax 15Mr. Pritesh N. Patel
  • 16Mr. Pritesh N. Patel