28 Nov 2012


Intent in Android activates the components.

  • Intent activates the three major components Activity,Services,Broadcast receivers through a Message.
  • The separate mechanism of intent object exist for each components.
  • For Activity-  intent object is passed to Context.startActivity() orActivity.startActivityForResult() to launch an activity. Also intent object can also passed toActivity.setResult() to return information to the  activity that calledActivity.startActivityForResult().
  • For Services- intent objects passes to Context.startServices() to start a services. also intent objects are passed to Context.bindServices()  which establish connection between calling components and target services.
  • For broadcast- intent objects are passes to Context.sendbroadcast(),Context.sendOrederedBroadcast() or Context.sendStickyBroadcast() which deleivers to all interested broadcast receivers. 
  • Intent objects are delivered to appropriate components without any ambiguity.

No comments:

Post a Comment

Translate