Home | History | Annotate | Download | only in intents
      1 page.title=Interacting with Other Apps
      2 page.tags=intents,activity
      3 helpoutsWidget=true
      4 
      5 trainingnavtop=true
      6 startpage=true
      7 
      8 @jd:body
      9 
     10 <div id="tb-wrapper">
     11 <div id="tb">
     12 
     13 <h2>Dependencies and prerequisites</h2>
     14 <ul>
     15   <li>Basic understanding of the Activity lifecycle (see <a
     16 href="{@docRoot}training/basics/activity-lifecycle/index.html">Managing the Activity
     17 Lifecycle</a>)</li>
     18 </ul>
     19 
     20 
     21 <h2>You should also read</h2>
     22 <ul>
     23     <li><a href="{@docRoot}training/sharing/index.html">Sharing Simple Data</a></li>
     24     <li><a href="{@docRoot}training/secure-file-sharing/index.html">Sharing Files</a>
     25   <li><a
     26 href="http://android-developers.blogspot.com/2009/11/integrating-application-with-intents.html">
     27 Integrating Application with Intents (blog post)</a></li>
     28   <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent
     29 Filters</a></li>
     30 </ul>
     31 
     32 </div>
     33 </div>
     34 
     35 <p>An Android app typically has several <a
     36 href="{@docRoot}guide/components/activities.html">activities</a>. Each activity displays a
     37 user interface that allows the user to perform a specific task (such as view a map or take a photo).
     38 To take the user from one activity to another, your app must use an {@link
     39 android.content.Intent} to define your app's "intent" to do something. When you pass an
     40 {@link android.content.Intent} to the system with a method such as {@link
     41 android.app.Activity#startActivity startActivity()}, the system uses the {@link
     42 android.content.Intent} to identify and start the appropriate app component. Using intents even
     43 allows your app to start an activity that is contained in a separate app.</p>
     44 
     45 <p>An {@link android.content.Intent} can be <em>explicit</em> in order to start a specific component
     46 (a specific {@link android.app.Activity} instance) or <em>implicit</em> in order to start any
     47 component that can handle the intended action (such as "capture a photo").</p>
     48 
     49 <p>This class shows you how to use an {@link android.content.Intent} to perform some basic
     50 interactions with other apps, such as start another app, receive a result from that app, and
     51 make your app able to respond to intents from other apps.</p>
     52 
     53 <h2>Lessons</h2>
     54 
     55 <dl>
     56   <dt><b><a href="sending.html">Sending the User to Another App</a></b></dt>
     57   <dd>Shows how you can create implicit intents to launch other apps that can perform an
     58 action.</dd>
     59   <dt><b><a href="result.html">Getting a Result from an Activity</a></b></dt>
     60   <dd>Shows how to start another activity and receive a result from the activity.</dd>
     61   <dt><b><a href="filters.html">Allowing Other Apps to Start Your Activity</a></b></dt>
     62   <dd>Shows how to make activities in your app open for use by other apps by defining
     63 intent filters that declare the implicit intents your app accepts.</dd>
     64 </dl>
     65 
     66