Information Systems DSO Book Ch02

14
Programming with Mobile Applications Chapter 2: Developing for Small Devices

description

Information Systems Development

Transcript of Information Systems DSO Book Ch02

Programming with Mobile ApplicationsChapter 2: Developing for Small DevicesIn Chapter 2, You Learn toDescribe the architecture of each platformSummarize the similarities and diferences between platformsEplain the life c!cle of an app on each platformCompare life c!cle features in each platform2 "ro#rammin# with $obile %pplications&eneral "latform %rchitecture%pplication la!erCore libraries'peratin# s!stem(ardware) "ro#rammin# with $obile %pplications*i#ure 2+, &eneral platform architecture-he %ndroid "latform. "ro#rammin# with $obile %pplications*i#ure 2+2 -he %ndroid architecture-he i'S "latform/ "ro#rammin# with $obile %pplications*i#ure 2+) -he i'S architecture-he 0indows "hone 1 "latform2 "ro#rammin# with $obile %pplications*i#ure 2+. -he 0indows "hone 1 architecture%pp Lifec!cle%pps ha3e a well+de4ned life c!cleEncompasses the e3ents of bein# started, runnin#, and bein# destro!ed Each platform has speci4c code for these e3ents -he 'S calls the code !ou suppl! for each life c!cle e3ent automaticall!1 "ro#rammin# with $obile %pplications%ndroid ComponentsComponent Functionality%cti3it! 5epresents a sin#le screen with a user interfaceSer3ice 5uns in the bac6#round to perform lon#+runnin# operationsContent "ro3ider $ana#es a shared set of application data7roadcast 5ecei3er 5esponds to s!stemwide broadcasts8 "ro#rammin# with $obile %pplications%ndroid %cti3it! Lifec!cle9*i#ure 2+/ Life c!cle e3ents in the %cti3it! component%ndroid Ser3ice Lifec!cle,: "ro#rammin# with $obile %pplications*i#ure 2+2 Life c!cle e3ents in the Ser3ice component%ndroid Content "ro3ider and 7roadcast 5ecei3er Lifec!clesContent "ro3iders store and retrie3e data ; no lifec!cle e3ents7roadcast 5ecei3ers listen for s!stemwide broadcastsLow batter!Incomin# messa#e,InitializeComponent=>5unnin# onStart=>,on5esume=>applicationDid7ecome%cti3e?Deacti3atedonStop=>,on"ause=>application0ill5esi#n%cti3e?,applicationDidEnter7ac6#round?%pplication@Deacti3ated=>,Aa3i#ated*rom=>%cti3ated on5esume=>application0illEnter*ore#round? %pplication@%cti3ated=>,Aa3i#ated-o=>Closin# onDestro!=>application0ill-erminate?%pplication@Closin#=>,. "ro#rammin# with $obile %pplications