0

I need to run an activity and remove all the other activities for my application to save memory. I have seen in the sdk that the flag FLAG_ACTIVITY_CLEAR_TASK does exactly this but I can't find it in the ActivityFlags enum in monodroid.

Is this possible to be done with monodroid?

Notbad
  • 5,936
  • 12
  • 54
  • 100
  • This answers it pretty well for pre-12 api http://stackoverflow.com/questions/5154743/android-clearing-the-full-activity-stack – Cheesebaron Jun 01 '12 at 08:21

1 Answers1

1

ActivityFlags.ClearTask is available in Mono for Android. However, Android didn't introduce this flag until API version 11, so I'm guessing that you're targeting a previous version. In order to use this flag, you'll need to update the minimum version of Android you target to 3.1, which is configurable in the project's properties page.

Edit: This question has some other approaches you can take to do this on previous versions of Android.

Community
  • 1
  • 1
Greg Shackles
  • 10,009
  • 2
  • 29
  • 35