From 909fe93021d20bc44cf483a37102275fa0d7a597 Mon Sep 17 00:00:00 2001
From: Adam Koch
This class shows some common ways you can send and receive content between +
This class covers some common ways you can send and receive content between applications using {@link android.content.Intent} APIs and the {@link -android.view.ActionProvider}.
+android.view.ActionProvider} object.Intent filters inform the system what intents an application component is willing to accept.
-Just as you constructed an intent with action {@link android.content.Intent#ACTION_SEND} in the
-Send Content to Other Apps Using Intents
+Similar to how you constructed an intent with action {@link android.content.Intent#ACTION_SEND} in
+the Send Content to Other Apps Using Intents
lesson, you create intent filters in order to be able to receive intents with this action. You
define an intent filter in your manifest, using the
When another application tries to share any of these things by constructing an intent and passing
it to {@link android.content.Context#startActivity(android.content.Intent) startActivity()}, your
-application will be listed as an option in the intent chooser (see figure 1). If the user selects
-your application, the corresponding activity (.ui.MyActivity
in the example above) will
-be started. It is then up to you to handle the content appropriately within your code and UI.
.ui.MyActivity
in the example above) will be started. It
+is then up to you to handle the content appropriately within your code and UI.
Sending and receiving data between applications with intents is most commonly used for social sharing of content. Intents allow users to share information quickly and easily, using their -favorite social applications.
+favorite applications.Note: The best way to add a share action item to an {@link android.app.ActionBar} is to use {@link android.widget.ShareActionProvider}, which became diff --git a/docs/html/training/sharing/shareaction.jd b/docs/html/training/sharing/shareaction.jd index f6be745..873f614 100644 --- a/docs/html/training/sharing/shareaction.jd +++ b/docs/html/training/sharing/shareaction.jd @@ -109,7 +109,7 @@ private void setShareIntent(Intent shareIntent) { want to set it and then update it as the UI changes. For example, when you view photos full screen in the Gallery app, the sharing intent changes as you flip between photos.
-For further discussion about the {@link android.widget.ShareActionProvider}, see the For further discussion about the {@link android.widget.ShareActionProvider} object, see the Action Bar guide.
-- cgit v1.1