In­tent Res­o­lu­tion

OpenSource For You - - DEVELOPERS OVERVIEW -

)Rr imSliFiW in­WHnWs, AnGrRiG ‘fig­urHs RuW’ WhH righW FRmSRnHnW that can han­dle them. This process is called ‘ In­tent Res­o­lu­tion’, which maps an In­tent to an Ac­tiv­ity, Broad­cast Re­ceiver or Ser­vice (or some­times two or more ac­tiv­i­ties/re­ceivers) that can han­dle it. If an ac­tiv­ity wants to re­ceive a par­tic­u­lar in­tent, it can do so in the two ways men­tioned be­low: a) It should spec­ify the same in the An­droid Man­i­fest.xml, in

the <in­tent-fil­ter> tags, as shown be­low:

b) <in­tent-fil­ter> <ac­tion an­droid:name="an­droid.in­tent.ac­tion.MAIN" /> <cat­e­gory an­droid:name="an­droid.in­tent.cat­e­gory.LAUNCHER" /> </in­tent-fil­ter> It can ex­plic­itly reg­is­ter a Broad­cast Re­ceiver us­ing erRe­ceiver(Broad­castRe­ceiver, In­ten­tFil­ter)

reg­ist

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.