Describe three common use cases for using an Intent.

0 votes
983 views
Harsh kumar srivastava asked 10-Jan-2018 in Technology by Harsh kumar srivastava

Describe three common use cases for using an Intent.

1 Answer

1 votes
Prateek sharma answered 10-Jan-2018 by Prateek sharma

the three common use cases to use the intent are -

  1. using for activity - this can be triggered by calling startActivity() method which invokes the activity we want to move in.
  2. using for service - this can be used to trigger a service by using intent. to use this you need to call startService() method.
  3. using for broadcasting - Intents can be used to broadcast message for example by using sendBroadcast() or sendStickyBroadcast().