0% found this document useful (0 votes)
27 views10 pages

Mad 5

The document discusses the Android application lifecycle, focusing on activity and service management. It explains explicit and implicit intents, the various states of an activity, and the lifecycle methods associated with them. Additionally, it covers the types of services in Android and their lifecycle, including how to interact with them through binding and unbinding.

Uploaded by

labadeshravani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
27 views10 pages

Mad 5

The document discusses the Android application lifecycle, focusing on activity and service management. It explains explicit and implicit intents, the various states of an activity, and the lifecycle methods associated with them. Additionally, it covers the types of services in Android and their lifecycle, including how to interact with them through binding and unbinding.

Uploaded by

labadeshravani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
ssignmepl_{- 5, Nome = _Dnyaneshiwar esh_Karany koe [| -subyec)_- Man —___ aging ahiect used in Ander between differenl campanents of an_apps oc bet? Ji€fereo! ope: = ntent atiow developer of pect oriety of task uch as launching Hvities starting eryices , brood jcostHag age § transferring dota betiseen app carn penent é Type. OD Expiicit antent 2) Implicit Intent Explain ach at lige cycle Activity aus hed on_creake (1) A on Restorte? on resume (9 Pio fe 2 { Achyity Running, On Poused (ged Achyity Bel) ciemad on stop ¢ ye 00 peshoy,(3 FOR EDUCATIONAL USE === iS ee ee Bs ackviky is created on_activity is Josnched thicg piled an once_ducing actly life cycle Mee enriraled innit ng ye AE this Not yet — isn cHivity ortivity is launched | no langer visible iwi in the Sropped_ —)y ces that ore nat aceded should be c@ me is activity is coed cohen ocHwity — yed ither due to usex closing Shes daming es. = imethad js called! chen an aclvity _{s_being xestarted FOR EDUCATIONAL USE _cannect (' database bseot exit cursor cy to create a See abe TABLE atamentes hema CColunO data type) § — Remeremnec) sey © ANsERT INTO sai statements to _add ___| 4 eae e@ Conn. commt) to save ehanges —_— ec dakaipase —______— e SQ SFIECT statement to metrive 4 ecute them with cursor -ewec te ———— it 3+ Connect Cexampl IR EDUCATIONAL USE | Ccunsar = Conn. Cursor) | cursor enecute C" | create tape af nol exrsT UsStie 10 | PRIMARY Ky ALTO TNCE! coe ___Qame TEXT Not Noll 4NtGtR i psert intousers (name ag?) VALOFS | _( seasu 11)" = . conn: commis¢) cursor exeruke ('selecn * Fort user rows = cursory: F etchalit) _ a Pox sow in cows oe pcint (rou) —-andenicl service life cycle hich ace campanes conn: Closet he Android Oescr that yun in the iackground 4 perform 1eog sunning orton | apauicotinn ox peavide Functionality tocthen applic |-there are two types of services be) 2 rices'- unbounded services are typically sea eck tasks thot needs to run-independontot | _speci¢ie client ,such as Playing music ox clocon lass er Don Crentec) = called when service is _cicst created Biperstaebe).: coved . when seevice._is started this : the service main togin is executed » s@ bh © xpiicitly stopped. ———}\__ex when _aystern eed to —aed.aicn sresourtes 2 : eReRscec | i cyice C __ service 15 hyt cow pee iGnundedr: 2 service ond services are used cohen a cli: s- Bo tr with & service dicectly suchas interact aperatians ona behale 109 data or perfermming # a © > callecl seohen Service ©) = called eohen an binds ta the-s|ers der object that vollouS:_. ++ FOR EDUCATIONAL USE \s Pirst creabed-_____— ice this methed __mejurns 00 3Bins the client 4o interact with servic lon Rebind ©) + Med nen existing client rebind teoiho service a SLanvobindc) = catted hen elient unbind bcc the srvind i€ no clients ore bovnd DesteyOh Spin Dirty = calred shen service Plc snbesnd Or when the sysrern needs to reclaim resources Be O eee multimedia Cromenork ix android ° digram = af media | I raedia ana ] oy ere Media @eerd ee Piedia server J paediG Amedia | NOE i sec x | yer | | Authors | OMows ch eloperr ts manoge audi 4 Bae ene ul eimadias cramesare that ootent eFCicen 4 ideo og 2 ecard ing Tne Feame works supper Me aricly Vike ploybox of media. dreaming and editing FOR EDUCATIONAL USE eraHoo — Media playe c Cae playback of audio vee cre com nee forage oy ouesr a Comman far mals tike mp, Mpit aoc Mey eC ji ever ses C) atures tive playbick contro) Cploy , couse top) seeking Looping: the netinark suppart oll medio Recorder :- used Car e ae Do Uppost multiple sources like the micraghon & Ox camera OVsput eorernats inclide MPa 2 e Ar R For audio. sy ediG server :- this component ikely manages Medig systen coordinating tasks } potential coviding shared resources: 6) write o pragrars to implement Android activity Tite Deere tao mMessag & throvgh ie cycle I. main pruvity OVO. package come onple_- activity life cycle’ ree eiceiidewcae Giind Vests oe 5. import android midget . toast’ Puplic ch Main Activity xtendS Ape Compact Achvity 4 © vercid 2 = = 4 = FOR EDUCATIONAL USE joport android -opptempact-app-App compact Activity) | Peoteckec) usid eo create (dundlé saved In bance state} Super: ancreate (saved Anctonce state)? ek conkenk view (8 layaut« a, Hivity = Moin): eas Cocchi cated vas) l HORT )- Shaw ¢> uy @_ override £ Protected volo Super. on stort cy’ Teast FOR EDUCATIONAL USE . X00) pea ri ah 10" encac = Nubf-gt2> Lineor layout pemee g ea ‘ hemeas- android -coro/ Pececiret ewidth =" mateh= parent” “ 42 mateh parent? mm) ee —igeovity = “Center eS EDUCATIONAL USE FOR EDUCATIONAL USE

You might also like