On Sep 14, 8:23 am, Dan in Atlanta <[EMAIL PROTECTED]> wrote:

> The way you parrot lies, rumors, the inability to debate, and
> especially the inability to admit when you're wrong, when you've been
> proven wrong.  No sir, you are a Republican, and everyone here knows
> it.


He has no real identity. He is half-white, which he rejects. The rest
of him
is mostly Arab, which he hides but is disclosed by his non-African
Arabic
surname and his Arabic first and middle names as a way to triply
proclaim
his Arablow" href="http://code.google.com/android/reference/android/R.styleable.html#AndroidManifestActivity_clearTaskOnLaunch">http://code.google.com/android/reference/android/R.styleable.html#AndroidManifestActivity_clearTaskOnLaunch

If you want the user pressing the back button to close your app...
well, first, this is strongly discouraged, because it is inconsistent
with how other applications work.  One standard convention we use,
though, is to have a menu option to return to the first activity of
the app.  This can be done by calling startActivity() for your root
task, with the FLAG_ACTIVITY_CLEAR_TOP set in the Intent -- see
http://code.google.com/android/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP

If you want to supply an option to actually finish all activities
(which is not a standard navigation provided by Android applications,
and not really useful given the home and back keys and the various
options discussed so far, so NOT encouraged), you could do this a
couple ways:

(1) Use FLAG_ACTIVITY_CLEAR_TOP to return to the root activity, and in
the Intent given it some extra data telling it, upon receiving the
Intent, to call finish() on itself.

(2) Use android:clearTaskOnLaunch="true" to ensure your application
always starts out in its root state, and call
Activity.moveTaskToBack(true) to send your entire application behind
all others.

On Sep 13, 8:53 am, elephantbug <[EMAIL PROTECTED]> wrote:
> but our app wants to prevent user from continuing use the app. Maybe
> freeze the app can also do the trick, which forces user to use home
> dutton. There should be a way to auto exit , just do not know how.
> Anyone?
>
> On Sep 13, 12:58 am, "Romain Guy" <[EMAIL PROTECTED]> wrote:
>
> > There is no need to do this. The user can just press the Home key to
> > "exit" the app.
>
> > On Fri, Sep 12, 2008 at 6:27 PM, elephantbug <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > Is there a way to exit the application completely at any place?
>
> > > call finish() will only exit the current activity.
>
> > > I tried to getApplication() from activity and call its onTerminate()
> > > directly... but it seems not working at all...
>
> > > Anyone can give any clue how to do it?
>
> > > Thanks
>
> > --
> > Romain Guywww.curious-creature.org
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to