Intro To Android (Workbook 2)

Intents

Android: http://developer.android.com/guide/components/intents-filters.html

Starting activities

  • Subactivity
  • startActivityForResult()
  • Request code
  • setResult()

More information: Meier, Reto (2012-04-05). Professional Android 4 Application Development (Kindle Location 4623). John Wiley and Sons. Kindle Edition.

Intent Resolution

Intent Filters

  • Declare actions
  • Data supported
<intent-filter
    android:action
    android:category
    android:data />

Resolving Intent Filters

When the system receives an implicit intent to start an activity, it searches for the best activity for the intent by comparing the intent to intent filters based on three aspects:

  • The intent action
  • The intent data (both URI and data type)
  • The intent category

Ordered Intents

TODO: Why would you want to use this?

sendOrderedBroadcast()

Use the android:priority tag in <intent-filter/> to set the priority.