summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-01-30 12:56:42 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-30 12:56:42 -0800
commita69894846c0e34228da71dccf4e8ef5ae95a45a3 (patch)
treeadf24bb75b491c64c257ea1fb34945eff0892be1 /docs
parente372593cfb973c8f8bdc46858dece9fcae9e178c (diff)
parent25fe8ef1b51b4a36e08b3fea35c0799f3d0840e2 (diff)
downloadframeworks_base-a69894846c0e34228da71dccf4e8ef5ae95a45a3.zip
frameworks_base-a69894846c0e34228da71dccf4e8ef5ae95a45a3.tar.gz
frameworks_base-a69894846c0e34228da71dccf4e8ef5ae95a45a3.tar.bz2
am 25fe8ef1: am e22f4748: Merge "Update documentation to reflect the old approach not working." into ics-mr1
* commit '25fe8ef1b51b4a36e08b3fea35c0799f3d0840e2': Update documentation to reflect the old approach not working.
Diffstat (limited to 'docs')
-rw-r--r--docs/html/guide/topics/ui/notifiers/notifications.jd24
1 files changed, 10 insertions, 14 deletions
diff --git a/docs/html/guide/topics/ui/notifiers/notifications.jd b/docs/html/guide/topics/ui/notifiers/notifications.jd
index 33b0fec..bef9671 100644
--- a/docs/html/guide/topics/ui/notifiers/notifications.jd
+++ b/docs/html/guide/topics/ui/notifiers/notifications.jd
@@ -245,31 +245,27 @@ an application to be part of that application's UI flow, so simply launching the
activity like this can cause it to be mixed with your normal application back stack
in undesired ways. To make it behave correctly, in the manifest declaration
for the activity the attributes
-<code>android:launchMode="singleInstance"</code> and
+<code>android:launchMode="singleTask"</code>,
+<code>android:taskAffinity=""</code> and
<code>android:excludeFromRecents="true"</code>
must be set. The full activity declaration for this sample is:</p>
{@sample development/samples/ApiDemos/AndroidManifest.xml interstitial_affinity}
-<p>Because of the use of <code>singleInstance</code>, you must be careful about launching
-any other activities from this one. These activities will be launched
-in their own task, and care must be taken to make sure this interacts
-well with the current state of your application's task. This is essentially
+<p>You must be careful when launching other activities from this initial activity,
+because this is not a top-level part of the application, does not appear in
+recents, and needs to be relaunched at any point from the notification with new data
+to show. This best approach is to make sure any activity launched from it is
+launched in its own task. When doing this care must be taken to make sure this
+new task interacts well with the current state of your exiting application's
+task. This is essentially
the same as switching to the main application as described for the Email style
notification shown before. Given the <code>makeMessageIntentStack()</code>
-method previously shown, handling a click here would look something like this:</p>
+method previously shown, handling a click then would look something like this:</p>
{@sample development/samples/ApiDemos/src/com/example/android/apis/app/IncomingMessageInterstitial.java
app_launch}
-<p>If you don't want to use the <code>singleInstance</code> launch mode for
-this activity, an alternative approach is to use <code>android:taskAffinity=""</code>.
-This tells Android that the activity should not be treated as part of the
-main application flow, so it will not get mixed together with that. All of the
-other issues discussed here do still apply, though this would allow you to start
-additional activities that are part of this notification task instead of switching
-to and replacing the main application task.</p>
-
<h2 id="ManageYourNotifications">Managing your Notifications</h2>
<p>The {@link android.app.NotificationManager} is a system service that manages all