@@ -245,31 +245,27 @@ an application to be part of that application's UI flow, so simply launching the
245245activity like this can cause it to be mixed with your normal application back stack
246246in undesired ways. To make it behave correctly, in the manifest declaration
247247for the activity the attributes
248- <code>android:launchMode="singleInstance"</code> and
248+ <code>android:launchMode="singleTask"</code>,
249+ <code>android:taskAffinity=""</code> and
249250<code>android:excludeFromRecents="true"</code>
250251must be set. The full activity declaration for this sample is:</p>
251252
252253{@sample development/samples/ApiDemos/AndroidManifest.xml interstitial_affinity}
253254
254- <p>Because of the use of <code>singleInstance</code>, you must be careful about launching
255- any other activities from this one. These activities will be launched
256- in their own task, and care must be taken to make sure this interacts
257- well with the current state of your application's task. This is essentially
255+ <p>You must be careful when launching other activities from this initial activity,
256+ because this is not a top-level part of the application, does not appear in
257+ recents, and needs to be relaunched at any point from the notification with new data
258+ to show. This best approach is to make sure any activity launched from it is
259+ launched in its own task. When doing this care must be taken to make sure this
260+ new task interacts well with the current state of your exiting application's
261+ task. This is essentially
258262the same as switching to the main application as described for the Email style
259263notification shown before. Given the <code>makeMessageIntentStack()</code>
260- method previously shown, handling a click here would look something like this:</p>
264+ method previously shown, handling a click then would look something like this:</p>
261265
262266{@sample development/samples/ApiDemos/src/com/example/android/apis/app/IncomingMessageInterstitial.java
263267 app_launch}
264268
265- <p>If you don't want to use the <code>singleInstance</code> launch mode for
266- this activity, an alternative approach is to use <code>android:taskAffinity=""</code>.
267- This tells Android that the activity should not be treated as part of the
268- main application flow, so it will not get mixed together with that. All of the
269- other issues discussed here do still apply, though this would allow you to start
270- additional activities that are part of this notification task instead of switching
271- to and replacing the main application task.</p>
272-
273269<h2 id="ManageYourNotifications">Managing your Notifications</h2>
274270
275271<p>The {@link android.app.NotificationManager} is a system service that manages all
0 commit comments