Actually, I got the behavior I was looking for by launching the edit
activity with the no history flag. It's not quite as flexible as I'd
like but everything works as expected.

On Dec 18, 11:25 am, Soonil Nagarkar <soon...@gmail.com> wrote:
> Giving this topic some life, is there any way to implement something
> similar to finishOnTaskBackground? It is possible to reenter a task
> that was previously in the background without going through the
> launcher, in which case the desired behavior of finishing a task with
> this flag does not happen. For instance, in my application, a user can
> select an item to edit from a list. Suppose in the process of editing
> this item, the user hits the home button taking them back to the home
> screen. From the home screen, they use an intent associated with a
> notification to reenter the task at the list of items. Here they can
> delete an item from the list. Pressing the back button now will take
> them to the previously opened activity which was editing the task
> (which they may have just deleted) resulting in unexpected behavior
> from the user's point of view.
>
> Is it possible to avoid this by setting some flags on either the
> notification intent or the item list activity?
>
> On Dec 11, 10:00 pm, "Dianne Hackborn" <hack...@android.com> wrote:
>
> > It was renamed to match the actual behavior.
>
> > On Thu, Dec 11, 2008 at 3:04 PM, Adam K <a...@everythingandroid.net> wrote:
> > > Does it do exactly the same thing?  It sounds to me like 
> > > finishOnTaskLaunch
> > > finishes an activity when it is relaunched from the homescreen - what I
> > > wanted to do is have an activity finish when it goes to the background.  
> > > Or
> > > would this be identical as calling finish() in the onPause() method?
>
> > > On Thu, Dec 11, 2008 at 5:16 PM, Dianne Hackborn 
> > > <hack...@android.com>wrote:
>
> > >> Yes the documentation is out of date, it got renamed to
> > >> finishOnTaskLaunch.
>
> > >> On Thu, Dec 11, 2008 at 7:57 AM, Adam K 
> > >> <a...@everythingandroid.net>wrote:
>
> > >>> ping!  is the documentation out of date?  or am i not understanding how
> > >>> to use finishOnBackground?
>
> > >>> On Mon, Dec 8, 2008 at 2:48 PM, Adam K 
> > >>> <a...@everythingandroid.net>wrote:
>
> > >>>> Hi all,
>
> > >>>> I want to do the following for a notification type activity that
> > >>>> should be removed/closed from the system either via a button in the
> > >>>> activity, or the user leaving with back or home:
>
> > >>>> from -http://code.google.com/android/intro/appmodel.html
> > >>>> Another approach you can take is to set the notification activity's
> > >>>> task affinity to the empty string "" (indicating no affinity) and
> > >>>> setting the finishOnBackground attribute. ... By specifying this
> > >>>> attribute, the activity will be finished whether the user leaves it
> > >>>> with BACK or HOME; if the attribute isn't specified, pressing HOME
> > >>>> will result in the activity and its task remaining in the system,
> > >>>> possibly with no way to return to it.
>
> > >>>> However, I don't see any other references in the docs to
> > >>>> finishOnBackground - the link on that page takes me to
> > >>>> finishOnTaskLaunch instead.  Any ideas?
>
> > >>>> Thanks,
>
> > >>>> Adam
>
> > >> --
> > >> Dianne Hackborn
> > >> Android framework engineer
> > >> hack...@android.com
>
> > >> Note: please don't send private questions to me, as I don't have time to
> > >> provide private support.  All such questions should be posted on public
> > >> forums, where I and others can see and answer them.
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support.  All such questions should be posted on public
> > forums, where I and others can see and answer them.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to