-1

I am currently writing an Android app to work as an activity launcher.
The main activity works as launcher and will let users launches a new activity from the main activity(here I create this new activity using FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_MULTIPLE_TASKS).
So that I can hold multiple these activities with the same name but different content in the background.
But I still need a method to manage them, which means I can offer a UI for user to choose to restart one and kill one.
Can someone give me a good solution?
I appreciate your help very much!
And you can also view a similar question asked by me yesterday: set unique identifier for RunningTaskInfo

Community
  • 1
  • 1
laosiaudi
  • 9
  • 2
  • What do you mean by "the same name"? Do you mean the same **class** name? Or do you mean the same **variable** name? Please show some code that illustrates what you are doing now? – Code-Apprentice Aug 09 '14 at 07:30
  • @Code-Apprentice the same name means the same activity's name for them.These activities share the same acvitity name, and that's why I use **FLAG_ACITIVITY_NEW_TASK** and **FLAG_ACTIVITY_MULTIPLE_TASKS**. – laosiaudi Aug 09 '14 at 07:32
  • Check http://stackoverflow.com/questions/17486672/list-of-all-of-the-activities-running-on-the-device to see if it can help. – Code-Apprentice Aug 09 '14 at 07:35
  • @Code-Apprentice Thanks for your link, but I don't think it will help because I know how get the running task information.I still want to set a unique and stable identifer for these tasks, not just get their information. – laosiaudi Aug 09 '14 at 07:37

1 Answers1

0

You need to get the list of Activity instances which are running in your application. List of all of the activities in our application that are running on the device gives an answer how to do this.

Community
  • 1
  • 1
Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268
  • Thanks for your answer, but I don't think it will help.Because it can just help me get all the same activities' name.I can not distinguish them. – laosiaudi Aug 09 '14 at 07:39