02 - app lifecycle

18
Click to edit Master subtitle style 02 | App Lifecycle Michael Palermo | @palermo4 Jeremy Foster | @codefoster

Upload: edilberto-chan

Post on 17-Aug-2015

214 views

Category:

Documents


0 download

DESCRIPTION

app life cycle

TRANSCRIPT

Click to edit Master subtitle style02 | App LifecycleMichael Palermo | @palermo4Jeremy Foster | @codefosterLaunching, suspending, and resumingesting lifecycle e!ents in "isual #tudioFile and $%& acti!ation#econdary tile acti!ationModule '!er!ie(Click to edit Master subtitle styleLaunching, suspending, and resumingApplication LifecycleLaunchAn app is launched (hene!er it is acti!ated )y the user (hile the process is in the NotRunning state*#uspendAn app can )e suspended (hen the user s(itches a(ay from it or (hen the de!ice enters a lo( po(er state* Most apps stop running (hen the user s(itches a(ay from them* +hen the user mo!es an app to the )ac,ground, the '# (aits a fe( seconds to see (hether the user immediately s(itches )ac, to the app* &f the user does not s(itch )ac,, the '# suspends the app*%esumeA suspended app is resumed (hen the user s(itches to it or (hen the de!ice comes out of a lo( po(er state*&f a suspended app is acti!ated to participate in an app contract or e-tension, it recei!es the resuming e!ent .rst, then the activated e!ent*+hen an app is suspended, it does not recei!e net(or, e!ents that it registered to recei!e* hese e!ents are not /ueued, they are simply missed* herefore, your app should test the net(or, status (hen it is resumed*Click to edit Master subtitle styleesting Lifecycle 0!ents in "isual #tudio1e)ug in "isual #tudioClick to edit Master subtitle styleFile and $%& Acti!ation1eclarations&n platform pro2ect pac,age*app-manifest .lesPlease, do try this at home3#tart | %un3)ingmaps4net5i-4asdf4codesho(4nic,metroapp4)ingmaps46/7co8ee9(here7#eattle10M':ommunity MegaphoneClick to edit Master subtitle style#econdary ile Acti!ation#econdary ilesvar secondaryTile = new Windows.UI.StartScreen.SecondaryTile("dom");ile&1 used in application acti!ation e!ent, a!aila)le !ia argumentsile&1 used in application acti!ation e!ent, a!aila)le !ia arguments// in activated event handlerif (ars.detail.ar!ments "== "") #var la!nch$emo = %S&'.(arse(ars.detail.ar!ments).la!nch$emo;if (la!nch$emo) #// (rocess and naviate))launch1emo 77 ;dom