Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 909fe930 authored by Adam Koch's avatar Adam Koch
Browse files

Minor tweaks to Sharing class, updated some typos, wording and a screenshot.

Change-Id: If456e812e8627d2cc361e1ad0d42439cbd53d43c
parent 3d672e1e
Loading
Loading
Loading
Loading
−10.1 KiB (22.4 KiB)
Loading image diff...
+3 −3
Original line number Diff line number Diff line
@@ -26,9 +26,9 @@ Intent Filters</a></li>
integrate with each other. Why reinvent functionality that isn't core to your application when it
already exists in another application?</p> 

<p>This class shows some common ways you can send and receive content between
<p>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}.</p>
android.view.ActionProvider} object.</p>


<h2>Lessons</h2>
+5 −5
Original line number Diff line number Diff line
@@ -43,8 +43,8 @@ new Google+ post with photos from the Android Gallery app.</p>
<h2 id="update-manifest">Update Your Manifest</h2>

<p>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 
<a href="{@docRoot}training/sharing/send.html">Send Content to Other Apps Using Intents</a> 
Similar to how you constructed an intent with action {@link android.content.Intent#ACTION_SEND} in 
the <a href="{@docRoot}training/sharing/send.html">Send Content to Other Apps Using Intents</a> 
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 
<code><a
@@ -78,9 +78,9 @@ Filters</a></p>

<p>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 (<code>.ui.MyActivity</code> in the example above) will
be started. It is then up to you to handle the content appropriately within your code and UI.</p>
application will be listed as an option in the intent chooser. If the user selects your application, 
the corresponding activity (<code>.ui.MyActivity</code> in the example above) will be started. It 
is then up to you to handle the content appropriately within your code and UI.</p>


<h2 id="handling-content">Handle the Incoming Content</h2>
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ from other applications by specifying them in your manifest.</p>

<p>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.</p>
favorite applications.</p>

<p><strong>Note:</strong> The best way to add a share action item to an 
{@link android.app.ActionBar} is to use {@link android.widget.ShareActionProvider}, which became 
+1 −1
Original line number Diff line number Diff line
@@ -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.</p>

<p>For further discussion about the {@link android.widget.ShareActionProvider}, see the <a
<p>For further discussion about the {@link android.widget.ShareActionProvider} object, see the <a
href="{@docRoot}guide/topics/ui/actionbar.html#ActionProvider">Action Bar</a> guide.</p>