summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-01-30 11:45:00 -0800
committerDianne Hackborn <hackbod@google.com>2012-01-30 11:45:00 -0800
commitfa9b5cae646ab1461c9f0f4b170c941e3da7c740 (patch)
tree293979c9320968405e88adcb0549c8b427118e84 /docs
parent7eeaf3f07aa6fb10639d9f96c1367eb98c3e8839 (diff)
downloadframeworks_base-fa9b5cae646ab1461c9f0f4b170c941e3da7c740.zip
frameworks_base-fa9b5cae646ab1461c9f0f4b170c941e3da7c740.tar.gz
frameworks_base-fa9b5cae646ab1461c9f0f4b170c941e3da7c740.tar.bz2
Update documentation to reflect the old approach not working.
The old approach has a problem with the original application's recent tasks entry disappearing (this is probably a bug in the platform). Update to an alternative approach that does work. Change-Id: I15e582eff8c77cc22628f7b099e9f04eb5bfbce7
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