Question:

Describe three common use cases for using an Intent.

Answer:

Common use cases for using an Intent include:

  • To start an activity: You can start a new instance of an Activity by passing an Intent to startActivity() method.
  • To start a service: You can start a service to perform a one-time operation (such as download a file) by passing an Intent to startService().
  • To deliver a broadcast: You can deliver a broadcast to other apps by passing an Intent to sendBroadcast()sendOrderedBroadcast(), or sendStickyBroadcast().

More information about intents can be found in Android developer’s guide.


Keywords:

© 2017 QuizBucket.org