You are on page 1of 69
SYLLABUS JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY UNIT - I CHAPTER - 1 : INTRODUCTION TO ANDROID OPERATING SYSTEM Android OS Design and Features-Android Develo Installing and Running Applications on Eclipse P Android Applications, Best Practices in Android I CHAPTER - 2 : ANDROID APPLICATIONS COMPONENTS AND ACTIVITIES outs, Menus ete. Android manifest File, Externalizing Resources Like Values, Themes, I t Resources for different Devices and Languages, Runtime Configuration Changes Android Application Lifecycle, Activities, Activity Lifecycle, Activity States, Monitoring State ‘Changes. UNIT - II CHAPTER - 3: ANDROID USER INTERFACE ‘Measurements, Device and Pixel Density Independent Measuring Units, Layouts-Linear, Relative, Grid and Table Layouts. i User Interface (UT) Components - Editable and Non-Editable TextViews, Buttons, Radio and Toggle Buttons , Checkboxes, Spinners, Dialog and Pickers. Event Handling - Handling Clicks (or) Changes of Various Ul Components. _ CHAPTER - 4: FRAGMENTS Creating Fragments, Lifecycle of Fragments, Fragment States, Adding Fragments to Activity, Adding, Removing and Replacing, Fragments with Fragment Transactions, : Folders and Files, Creating | iles, | Shared Preferences-Creating, Shs FOR M.TECH - (JNTU - H) I SEMESTER ~ CSE, Il SEMESTER - WEB TECHNOLOGIES teenie CONTENTS 1.1 INTRODUCTION TO ANDROID OPERATING SYSTEM 1.2 ANDROID OS DESIGN AND FEATURE 1.3 ANDROID DEVELOPMENT FRAMEWORK 1.3.1 Understanding the Android Software Stock 1.3.1.1 The Dalvik Virtual Machine 1.3.1.2 Android Application Architecture 1.3.1.3 Android Libraries 1.4 SOK FEATURES 1.5 INSTALLING AND RUNNING APPLICATIONS ON ECLIPSE PLATFORM 1.5.1 Developing for Android... 1.5.1.1 What you Need To Begin... 1.5.1.2 Downloading and Installing the Android SDK 1.5.1.3 Downloading and Instilling Updates to the SDK... a 1.5.1.4 Developing with Eclipse ... & 1.5.1.5 Using the Android Developer : Tools saa pI FF ECP 16.16 ugging your Android Application 2 [ANDROID APPLICATIONS COMPONENTS AND ACTIVITIES) TANDROID APPLICATION COMPONENTS INTRODUCING THE ANDROID MA 22.1 A Closer Look at th 2.2.2 Using the Manifest § EXTERNALIZING RESOURC 2.3.1 Creating Resource RESOURCES FOR DIFFEREN RUNTIME CONFIGURATION ANDROID APPLICATION LIFECYCL 26.1 Android Application Priority Application LifeCycle Events Android Activities 26.3.1 Creating Activities. 3.2 The Activity lifecycle 3.1.2 Android User Interface Fundamentals 3 User Interface Layout 3 Assign M 3.3 EVENT HANDLING 2.36 or Changes of Various Ul Components 2ae 3.3.1 Handling Clicks 3.3.2 How it Works DEVELOPMENT PROFESSIO 1 Fragment-specific Lifecycle Events , 4.3.1.1 Attaching and Detaching Fragments from the Parent Activity 4.3.1.2 Creating and Destroying 4.3.2 ADDING 4.4.1 Using Fro 4.4.2 Adding, Removir 4.4.3. Using Popule 4.4.5 Fragmen 4.4.6 Animating 4.5 INTERFACING BETW 4.6 MULTI-SCREEN ACTIVIT UNIT - III (CH. - 5] [INTENT AND BROADCASTS} ...... 5.1 INTRODUCTION TO INTENTS 5:2 USING INTENTS TO LAUNCH ACTIVITIES 5.3 EXPLICITLY STARTING NEW ACTIVITIES $6.4 IMPLICIT INTENTS APPLICATION DEVELOPMENT .6.2 Returning Result. 5.6.3 Handling Sub-Activity Results NATIVE ACTIONS 5.8 USING INTENT TO DIAL A NUMBER OR TO SEND SMS oe §.8.1 Using Intent to Dial a Numbe ae N Diale 3.1 1s 3.13 MS Me the SMS Manager .... 3.13 5.8.2.2 3.14 2 6 UNIT - Ill [CH - 6] [BROADCAST 9 - 3.26 6.1 INTRODUCTION TO BR 3.20 6.1.1 Creating the 3.20 6.1.2 Registering Broc 3.20 6.2 USING INTENT FALTER NTENTS 3.21 6.3 RESOLVING INTENT FILTERS eee 64 FINDING AND USING INTENTS RECEIVED WITHIN AN ACTIVITY ......:0000+ PROFESSIONAL ION TO NOTIFICATIONS CREATING NOTIFICATIONS 7.2.1 Creating « Notification and Configuration the Slatus Bar Displa 3.29 7.2.2 Using the [unin 1v [ck 8 44 ting Contents en 46 8.1.5.1. Creating and Say ae re 8.1.5.2. Retrieving Shared Resources ANDROID APPLICATION DEVELOPMENT PROFESSIONAL INTRODUCTION TO SQLITE DATABASE CREATING AND OPENING A DATABASE 9.2.1 Introducing the SQLiteOpenHelper AAT 9.3 REGISTERING PROVIDER 413 9.4 USING CONTEN 413 9.4.1 Inse 13 9 4 r : 5.11 11.2.2 Customiz a 11.2.3 Specifying « Download Locatior _ 11.2.4 Cancelling and Removing Downloads 11.2.5 Querying The Download Manager HON TO LOCATION BASED SERVICES FINDING YOUR CURRENT LOCATION 12.2.1 Location Privacy 12.2.2 Finding the Lost 12.2.3 An Exomp 12.2.4 Refreshin PROFESSIONAL PUBLIK INTRODUCTION TO ANDROIE OPERATING SYSTEM YLLABUS_ [M.TECH - HYDERABAD] 4 a vork, SDK Features, Installing and. of Android Applications, Bese ‘used just for making phone ci @ part of it, Now they are not used for just ble users and can be used as a camera, Music p t i ete., that requires new technologies, new software and'@ HS Years, operating systems have developed alot. Starting from black phones to recent smartphone or mputers, mobile OS has come for awa ily for smartphones, mobile OS has greatly evolved f aim OS is 1996 to pocket PC in 2000 then t droid HISTORY OF ANDROID ne of the most widely used mobile ( ID is an open Platform for mobile development 1g not only Operating system but also m ded in Pale Alto of Californio, U.S by Andy R fe in 2003 Later Android Inc. was acquired have been humber of updates in the Origir Android is an ecosystem (i) It is an free, an open-sou (2) It is an open-source developr (3) The devices, particularly mobile | erating system: and the applications are created f Android versions have been developed und: jorder. Beginning with Android 1.5 “Cupcake’ Teleased under specific name released in alphabetical 1.0 and 1.1 where not the earlier versio ‘ (1) Android 1.1 N/A version Following are the versions of an Android as, / released in Feb. 2009 a supports for savin attachments for MMS. nd that supp i Android 1.5 cupcake version released in April 2009 and uploading videos to and pictures to picasa. Bluetooth A2DP and AVRCP support. i) 3D desktop © Gi) Video chat and Gtalk support W) Android 4.0-4.0.2 ceCreamSand (October 19, 2011. Icec sand system, Flash Play version to officially support is versions as follows, @ Soft buttons from se on phones. (i) Separation of widgets to applications. (ii) Easier-to-create Google announce rence on June 2%, 2012. The fea () Smoother user inte (ii) Bluetooth data transfe (40) Android 4.2-4.22 JellyBean released ont 13, 2012 it has the follow (@) Lock screen improvement pport and the ability to swipe directly to camera (i) Notification power controls ("Q ings) (Gi) Android 4.3-4.3.1 JellyBean was released by Google under the slogan “An even § JellyBean” on July 24, 2013. A minor bug fix update was released on Aug. 22, The following are the features, Bluetooth low energy support. th Audio/video remote control profile (AVRCP) 1.3 3.1 and Android Extension Pack (AEP) on suppot Wersion is Android 6.0-6.0.1 MarshMallow was released on Oct. 5, 2045, oO “Now on tap features _ @ Doze mode. Gi) App standby feature (lv) Alphabetically accessible vertica (W) Native finger print reader support a ATIVE ANDROID APPLICATIONS Android devices typically come with a pre Android (Open Source Project (AOSP) as follows (2) An e-mail client. (2) An SMS management application (3) Af nagement (PIM (8) Afall Personal Information Management ( n fer and contacts list. (4) A webkit-based web browser. (5) A music player and picture gallery. (6) A camera and video recording application (7) A calculator. navigation, satellite views: ‘Google talk instant-messaging client. itube video player. IDROID OS DESIGN AND FEATURES Android is a powerful Operating System (OS) competing w le 4GS and supports res are given as below, the great features. The followi t a user interface. (1) Beautiful UI : Android Os (@) Connectivity : GSM/EDGE, IDEN, CDN LET, NFC and WiMAX. (@) Storage : SQLite and a Purposes (4) Media Support : H.263, H.264 MIDI, Ogg Vorbis, (5) Messaging : SMS and MMS n with chrome’s (6) Web Browser : Based on the porting HTML V8 Javascript engine sup (7) Multi-touch : Android has native support for m c h was Initiellyainall available in hand-sets such as the HTC Her (B) Multi-Tasking : User can jump from one task to another and same time various application can run simultaneously. G°M : GCM stand for Google Cloud Messaging. GCM is a service that allows developers | fo Sends short messages data to their users on Android devices without m Proprietary syne solution. + A popular NFC-based technology that allows use instal © NFC-enabled phones together. ‘memory and process management processes as necessary to manage resources, is used to create applications, including the Development Kit (SDK) every thing and g end documentation. The Android SDK includes g, testing and debugging Android application as follows the Android API libraries and provide developers Android APIs : The Core of SDK to access the Android stack Development Tools : SD! ‘application so that it tur (8) Android Virtual Device Manager and Em interactive mobile and that simulates a hi. (@) Full Documentation documentation and ¢ detailed explanations of (8) Sample Code : The Android SD! wl demonstrate possibilities a with how to use an individual API (6) Online Support : Android has ra Google groups (hiip://developera unity. The licationDeveloper Lists) are active forum of Android de Pr th regular input from )) {8 Android engineering and developer relations teams at Google it the Android Software Stack The Android software stack is simply, a Linux Kernel and € collection of C/C++ libre and exposed through an application framework and that provides services f ny ices for the ‘management of run time applications. The Android OS consists of four main lj al plication framework, Libraries and Application layer. Whee (©penci, Sct, a" Dalvik Virtual Machine Hardware Drivers (USB, Display Bluetooth, etc (1) Application Layer : This is the tor This layer consists Of a software written by the An third party software that is installed on device he most core features su phone and the contacts applications resides in this layer. Application Framework : The application framework provides all the major APIS and that the application will use including things like sharing data, accessit ithe telephony systems and receiving notification. This layer completely “and webkit for integrated web BRET) THe Whole Android OS built on top of the Linux 2.6 kernel further architectural chants made by Google. The Linux provides such things Sihibry networking, drivers and power management The kernel prol Bian iayer between the hardware and the remainder of the stack, WB) Android Run Time : The runtime is what makes an Andrs hone rather than @ mg Linux implementation. 1 includes the core tit k VM, y available in ti @ Gore Libraries : These libraries provide core Java libraries as well a: (ii) Dalvik VM : It is a register ba: l n optimized to ensure that, a dev The Dalvik Virtual Machine Dalvik VM is one of the key raditional Java VM such as Java ME, Android re multiple instances run efficiently on a s | Dalvik VM uses the devices under unctionality and including security, threading and m sle to write Cf C++ applications and run closer to the Li files, a format optimized to ensure minimal Sa @xecutable by transforming Java language compiled cl : an aio ae = the SDK. the tools supplied wit EER Android Application Architecture in these applications share the data. (@) Resource Manager : In enables non-code resources such as strings and to externalized {© intents : Tt provides a.mechanism for transferring data between applications and tl components GEREM Android Libraries Android offers a number of 1 tions er than listing them ten, and check out th and it gives comp Android is intende so be aware ‘ of the suitability and imple APIs that may depends on the GPM spK FEATURES Android software reated for the Android operat oped in Java programming language e SDK includes @ comprehensive set of develor aries, a handset Of emulator based on QEMU, torials currently supported development orn 3 Linux, Mac OS X 10.5.8 and Window XP. The SD! elf, but the software development is possible by using, specia Following are the relative featu (i) Access to Hardware, Including Camera, GPS, and Sensors : Android includes API plify the development of involving the device hardware and it ensure: that we don’t need to create specific implementations of our software for different devices, so we can create android applications that work as we expected on any, device and supports Android software stack. libraries to s The Android SDK includes API's for location-based hardware such as GPS, dio, network connections, WiFi, Bluetooth, Sensors, NFC, touch screen. gement. ® « 6) (2) Dota Transfers Using Wi-Fi, devices, including bluetooth transferring data between beam. These technologies offer on hardware that available applicatio Maps, Geocoding, and L to Backgrou SQLite Datal Shared Data o t @ intents PP (i) Content Providers nager a within ou ii Bluetooth and NFC ¢ ‘Android offers rich support for and Android Jepending the co fe content modify data from PUBLICATIONS iil files including MPEG4, 1.264, HTTP Live streaming, VP, TPG, PNG and GIF formats. Cloud to Device Measuring : The Android Cloud to Device Measuring Provides an efficient mechanism for developer to create event driven a! based on server-side pushes. Using C2DM we can create a lightwelghty connection between our mobile app and our server and allowing Us #8 small amounts of data Optimized Memory and Process Management : d NET itself, uses Android in! E its own runtime and VM 8 unlike with these other ™ F frameworks, the r lifetime, For higher-priority 3 applications, An opping and killing q processes i Int ‘ stion which user Is } interact a swift death but are stil the background if necessary ai t c ntrol their Own life times ERG INSTALLING AND RUNNING APPLICATIONS ON ECLIPSE PLATFORM The Android SDK, the a pse, are each available for widows, Mae OS! andl t fort of whatever operating system in explore andr Linux, and we c: favor, The SDK tools and emula work on all three OS environment because Ani (VM) there is no advantage of dev applications are run on a Dalvik Virtual any particular OS. Android code is written using Java syntax and the core libraries includ features from the core Java API's. Before you run a project, you must _ into Dalvik bytecode. you Need To Begin ym we can write them on any n "thin the Daivik ses ‘ This currently ! I 7 that supports the developer tools. {@) Microsoft Windows (xP or later) chip udes as following, (@) Mac OSX 10.5.8 or later (Inte (@) Linux (Including GN To get started, we (1) The Android SDK sta’ (2) Java Development The following sect download from Su §EREM Downloading and Installing There is no co application to pass 2 The Google playstore requi ve chose not to distribute via the Googl You can download the la your chosefl ment platform fror development platform elopet xhtml, The start ackag atest version android. com/sa/inc of the Android tools and required to - f oid SDK packages If you are developing from a windows plat dows installer Bvallable 25 alternate to the Zip file for installing the plat ng the platform tools Before we can begin development, you have felease that can do on Windows by runnin MAC OS of Linux by running the to download at least one SDK platommtt “android” '9 on the SDK manager.exe executable, Of executable in the tools subfolder bf the Package download. APPLICATION DEVELOPMENT PROFESSIONAL Show: Sor ty: Done leacin This inclu a collection of extra To see a list ) Documentation for Android SDK Hoc isaied SOK Platform fot instal & Sumoles for SOK notinsaled i ARM FAB v7a System-image Not instale & Google APIs by Coogle By Android 3.2 (APL i Android 3.1 (AP 2 Android 3.0 (APL 11 Androls 2.3:3 A’ Android wu @Miieve it, and includes the to To get framework SDK and th he package ithin started firstly we have the newest upport library, documentation and sample code. When w ° ) S you can also need to select the Google APIs by Google ¢ from the platform releases you want to Support. Then you click the Install Pack Will downloaded to your SDK installation folder. The re: SAPI libraries, documentation and several sample applications. button then what ver you chosen packages: It is an collection of framework ‘APPLICATION DEVELOPMENT _ PROFESSIONAL PUBLIG: ‘and step-by-ster ‘Android Developer Tools (ADT) Plu! for Java IDE we can comfortable wit P compile, test and debug the code snippets © When using Eclipse with the ADT pl Significant advantages, primarily through the debug tools into your IDE. .g-in, Neithe! nd sam| n for n-source Particularly, Eclipse Is an o u t platfor download for each of the developr 0S, and Linux) from the Eclipse four ‘available with many variations such as Eclip the ADT plug-in, Eclipse 3.7 (Indigo) (E (1) Eclipse Java Development Tools (2) Web Standard Tools (WST These are tools that are include ©) PEREB Using the Android Developer T The ADT plug-in for Eclipse simplifies y developers tools, including the emulator anc We don’t have to use the ADT plug-in and it ca our applications faster and easier. The ADT plug-in integrates following into Eclins (1) An Android project Wizard, it can be sim @ basic application technique, : (2) Forms-based manifest, layout and res, < validate our XML resources, ‘ource editors they help to create, (3) The automated building of android packages onto Dalvik VMS (running botn both wit eted at developers required, you can U eloper tools in p instructions are tara h and use the dev ple applications. ; Android development offersig plified by creati Conversion to Android hin the Emulator or on f the Android bull available fgg Windows, Eclipse ate ired to tse avices to host emulators that run a specific release of the ‘hardware and memory constraints. The Android Emulator, including the ability to contro! the Emulator’s network connection settin the ability to simulate incoming calls and messages. The Dalvik Det + forwarding, stack, heap and Ace box :htips://dissi.google com/andro! 15 for the ADT plug 3, Select . Wen finished, it ¢ searche: it by clicking the ¢ own in the Fig. 1.5 (w) Press OK and Eclipse available plug-ins, 25 5 next to the developer t Beh ‘Available Software ols root node and then click Next instal (check ee it ev Android DOMS cI Seared rar @ sp Andi even J Select Daas 14 Spow ely the lates version \ & croup tems by caevory . “7 (2 Show enly software applicable to tar | @ OID APPLICATION DEVELOPMENT Finish, As the ADT plug-in not signed, you'll be pro continues. Preferences. Restart and select V for MAC OS) (will)Select Android form \ () { the Android SDK, je SDK target, as (2) Updating the ADT Plug in : F are the steps in most cases where we eal update our ADT plug-in simple () Navigate to Help + check for Updates. ort library into our Projects: tre the steps to incorporate @ SUPP project hierarchy. had a new/libs folder in the root of your support library JAR file from thi I@) Ih Android SDK installation location, copy th android/support/tolder ur project bull @) Affer copying the file in to your project's/ i and then ad path by rightclicking in the package exp! to build path. GRGHMI CREATING AvD’s AVD’s are used to simulate the hardy different Android devices, and allows you to tes form. In the ‘Android SDK, there are no prebuilt AVDS, s it ed to create: ‘ atleast one before we can run and debu The following are the steps to create an A\ (1) Select Windows -» AVD manger (or select AVD x he tciipce toolbaly (2) Select the New... button. I Mhe resulting Create new Android Virtual Device (AVD) d jalog allows youl € (AVD) di @ target build of Android, an SD card capacity and device (3) Create a new AVD called configure a name, My_AVD" that targets Android 4.0.3 , incl 4 card and uses the Galaxy Nexus skin that ‘is shown in Fi includes a in Fig. Bhs Glick Create AVD and our new. AVD wil be created ang it is read is ready an GRRAMETYPES OF ANDROID APPLICATIONS Following are the most of the 1 Android that fall into one of the following categori (1) Foreground Applications : These application is useful only when it is in the foreground and is effectively suspended when it is not visible. When creating an foreground applications, you need to consider carefully the activity lifecycle so that the activity Switches seamlessly between the background the foreground ‘Example : The most common examples are games. PROFESSIONAL P' Ber interactions. plications, SMS auto-responders Exomple © It includes call screening apt clocks. pplication that cam Intermittent Applications y foreground acth user input Well-designe Example (4) Widgets ond Live Wallpap iavide titer ] screen GREW BEST PRACTICES IN A GERM Creating Your First Andr When you download the s s » then oti you ready to star ro mming ni ing a nell Android project and setting up your Ecl Following are the steps to create a ni 3 d the Android ei project wizard, (1) From the menu select File + New * Project : New Android Praject Create Android Project Select project | Project Nav w ETE Baie (4) Following F application. These target applica k SDK that you cam plan to develop, adreid Open Source Project The Google these A release (5) Follow propert crene The Application N Package Name specifies f a class that will be in and the ctivity specify the name version of the SDK and If you selected create Activity, then ADT plug-in will create. that includes a class that extends Activity HEE creating Launch Configurations The launch configurations allows you to specify the runtime options for running: amily debugging applications. From the launch configuration, (1) The Project and ai PROFESSIONAL PUBL Network Latency Wipe User Data C2 Disable Boot Animat Additional Ly ulate GEER Running and Debugging your Android Application Previously, we ha “ eer” ve created ject and created the run and debug configurations fo : test your application and configuratios ee elect R me ANDROID APPLICATION DEVELOPMENT ge com.pad.helloworld: import android.app Activity’ android. 0S. Bundle ty extends A class MyActivity @Override public void onCreal { superonCreate(saved im) setContentView(R.layou " th to Gece Hcl i in In Android, we can also called visual co controls in traditional desktop development. Th by the Wizard and it overrides the onCreat f which are $i e ab rogram 1.88 method t wentViee Following code which layouts the UI by inf @Override lating a layout resource, Public void onCreate (Bundle savedinsta { DeSlate) SuperonCreate(savedinstancestate), SetContentView (R. ayout main) android:layout_width; android:layout_height="fil ‘android:orientation="vertical” The following code shows how to get access to it in code, TextView myTextView=(TextView)findViewByld(R.id.myTextView): © preferred way of plication logic from 6uF dentifier attributes to eturn 2 reference © the TextView Widget Layout.LayoutParams ar ara (oT LinearLayout. Layout oulPi new Linearlayout.Lay' FILL_PAREN FILL_PARENT) Params textViewLP: LinearLayout . LayoutParams tex! texiViewLP=new LinearLayout . 1°) LinearLayou! fe setOrientatic fextView myTextView myTextView.se x N. addview (m ie this.addCor ie } if Goes In the above program all the prot at can He with attributes in the XML layou GE ANDROID TooLs The Android SDK includes several tools and v k ebug your projects. As we mentioned earlier, the ADT Oa eee eee teold into the Eclipse IDE, where we can ane Perspective and includes the followin ae 9, (1) The Android Virtual Device Manager ; The ao to create and mange the virtual devices that wi so ost i are used to simulate the software build: different physical devices, Ba lariny rtual device manager (8) instances of the Emulat re configurations a) SFESSION eae perating System [Wal = 1, Ch i The following Fig. 1.9.1 show: create new Android Virtual Device (AVD) dialog Pe 7g ws [Greate Hew Android virtual Device (AVD) (i) Screen pix (i) SD card support ANDROID APPLICATION DEVELOPMENT PROFESSIONAL PUBLICATIONS 4) (6) | resolution) for audio recording. ware back and home keys Android SDK Manager d SOK manager can be used tO Seema io nstall new SDKs when i of version of the SDK we otal feleased. It displays when each platform Is rele? ' and a number of additional support pa (ix) Existence of hard The Androi had installed and to SDK platform, documentation, too! The Android Emulator applications. The Em valid platform for running An decoupled from any particular hard baseline. The ADT plug-in t i aunchel automatically with in t ts. If we are not f de oft “ ” Eclipse, then we can telnet i > exe the Emulator, first we need to cre previ The Emulator will launch the v nt The Dalvik Debug Monitor Service application will look, behave and interai ening unde the surface and we need to the Dalvik Debug b debugging tool that lets to interrogate watch and pause active threads and explore the ¢ ai y y connected Anil e how me ee Pam Perepective in Eclipse also provides Captures of the Emulator and ’ iidces oe the logs generates by locate The Android Debug Bridge ; application that allows us to ¢ Following are the three components oj f ADB, mmunication conduit between our development lator, the ADB allows you to install applications fun shell commands on the target device. Using the device shell, logging settings, and query or modify SQLite databases available on the ADT tools automates and simplifies a lot of the usual interaction with the includes the application in: it Jating file logging and file transfer (@) The Hierarchy Viewer and Lint Too! your UI because to build applications f J lint tools that help us to analy within the our applicat e structure: of our UI ested View is displayed i 1 identifier. The ies of comr tion perfoi 7) Monkey and Mont ur applicat ell and Alt specific UI com ation. It is extre dictable, repeatab ANDROID APPLICATIONS COMPONENTS AND ACTIVITIES SYLLABUS _ [M.TECH - HYDERABAD] dro ixte s Layouts, 0 t runs in the D for remote processes, is a component thal or to perform work ‘a user interface. nages a shared set of | ‘an SQLite database on thel cess. Through @ fy the data. provider ma system, applicat Content Providers » A content We can store the data in the file ‘other persistent storage location our provider, other applications can ct n car #8) Entents : It is an powerful int framework Tht sed to extensively throug its to stant Activities and services, to bro: r to an expligiil service or Broadcast Rec med on @ Bai piece of data (8) Broadcast Receivers : They 2 application to listen fo Broadcast receivers s' making them perfect for the devite f les you im heir hon {6) Widgets : Visual applic Screen. The special varia dynamic, inte (7) Notifications : Notifications en. Stealing focus or int 3; venti They are the preferred tech: ts not visible or active, parti BEB introvucine THE ANDROID MANIFEST FILE Each Android project includes a manife: ifest its Priest hierarchy. The manifest defines the s its components and requirements, file, AndroidMar , it tone tructure and f It includes pce, sacl each ‘eceivers and that make up he ission and they determine OR how they interact wit ON DEVELOPM the Activities, services, pplication and using ith each other and ponents such as, @ Identify any user permission the application requires such as Internet access to the user's contacts (@) Declare the minimum API level required by the application, based on Which application uses. py the application, SUCH @) Declare hardware as camera, bluetooth s t ree (4) API libraries the the Google Maps Library and EBZRIBA Closer Look at tt ppli Manifest The following t node The manifest tag can in F components, security. settings, test classes e e pplication The following list gives ary of the available gst sub-node tags and provides an brief XML brief extract how each tag Is used (1) Uses-Sdk : This nodes enables to define a minimum and maximum SDK version that must be available on a device for your application to function properly and target SDK for which it has been designed by using a combination of minSDKVersiomiy MaxSDKVersion and targe'SDKVersion attributes respectively. Uses-Configuration : This node specify each combination of input m supported by our application. We should not need to include this ‘can be useful for games that require particular input controls, ene and +t specify true when our application requit nard type as one of the nokeys, {il) reqkeyboardtype : It specifies the key? twelveky, or undefined ’ r v, dad Ife) FedHlevigation : It specify the attribute value @ vrackbal, Wheel, or undélined as a rea a (W) reqTouchScreen specify the required tc The following w (@) Uses-Feature : Andi multiple uses-fea requires. This pr Include a required p As the variety of plat the optional hardware. V hitp://developer.androi himi#features-reference Following is an example for an audio note, t supports recording : ltem 1< 14sp _

You might also like