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