0

I have a app that sets the main Actvity as the main launcher. How can I prevent my current foreground Activity from closing whenever I press the Home Button which calls the background activity from the bottom of the stack. Is there a way to trap the intent and allow the the foreground ativitiy to finish. My manifest has the following:

android:launchMode="singleTask"

Marko
  • 41
  • 2
  • Why do you want the Activity to prevent the user from leaving? If there's some background operation, can you put it in a Service or IntentService? – DeeV Dec 12 '12 at 15:39
  • I want the user to finish the operation in that Activity screen before exiting out. – Marko Dec 12 '12 at 15:50

1 Answers1

1

There is no way within the public APIs to "override" the home button in the manner that you wish.

FoamyGuy
  • 46,067
  • 17
  • 123
  • 153