[android-developers] Re: Displaying already existing activities
I'm facing exactly the same problem. I'd also like to reuse an already started activity (A) in the background but no luck so far. I haven't tried singleInstance but I tried to set various launch flags (Intent.setLaunchFlags) on the Intent being used to restart A, however, always a new instance of A was created. BTW, my activity B from where I try to reuse A is also a MapActivity. I'd also like to set intent-filters on A so that it can be accessed from other activities, then one can end up with several instances of A in the background... Kosmaj On Apr 9, 11:06 pm, Mihai Fonoage [EMAIL PROTECTED] wrote: Any other comments are welcome! Mihai On Apr 8, 3:12 pm, Mihai Fonoage [EMAIL PROTECTED] wrote: The solution you mentioned was also the one I found on this forum, and which requires the task id for theactivityto be passed in the moveTaskToFront method call. Unfortunately, everyactivityI create has the same task id. This would not be the case if theactivitywould be created withsingleInstance, but I detailed the problem I have with this solution. Thank you, Mihai On Apr 8, 2:35 pm, David Welton [EMAIL PROTECTED] wrote: It would have been nice to be able to get a list of all existing (background) activities and close them manually, but I don't think it's possible. My guess is that you're going to have to go fishing in the undocumented stuff, which might all change tomorrow. This class looks interesting: public final class android.server.am.ActivityManagerService extends android.app.ActivityManagerNative{ It has this method, for instance: public void moveTaskToFront(int); No idea of course whether any of it's accessible. -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ --~--~-~--~~~---~--~~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Displaying already existing activities
Any other comments are welcome! Mihai On Apr 8, 3:12 pm, Mihai Fonoage [EMAIL PROTECTED] wrote: The solution you mentioned was also the one I found on this forum, and which requires the task id for the activity to be passed in the moveTaskToFront method call. Unfortunately, every activity I create has the same task id. This would not be the case if the activity would be created with singleInstance, but I detailed the problem I have with this solution. Thank you, Mihai On Apr 8, 2:35 pm, David Welton [EMAIL PROTECTED] wrote: It would have been nice to be able to get a list of all existing (background) activities and close them manually, but I don't think it's possible. My guess is that you're going to have to go fishing in the undocumented stuff, which might all change tomorrow. This class looks interesting: public final class android.server.am.ActivityManagerService extends android.app.ActivityManagerNative{ It has this method, for instance: public void moveTaskToFront(int); No idea of course whether any of it's accessible. -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ --~--~-~--~~~---~--~~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Displaying already existing activities
It would have been nice to be able to get a list of all existing (background) activities and close them manually, but I don't think it's possible. My guess is that you're going to have to go fishing in the undocumented stuff, which might all change tomorrow. This class looks interesting: public final class android.server.am.ActivityManagerService extends android.app.ActivityManagerNative{ It has this method, for instance: public void moveTaskToFront(int); No idea of course whether any of it's accessible. -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ --~--~-~--~~~---~--~~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Displaying already existing activities
The solution you mentioned was also the one I found on this forum, and which requires the task id for the activity to be passed in the moveTaskToFront method call. Unfortunately, every activity I create has the same task id. This would not be the case if the activity would be created with singleInstance, but I detailed the problem I have with this solution. Thank you, Mihai On Apr 8, 2:35 pm, David Welton [EMAIL PROTECTED] wrote: It would have been nice to be able to get a list of all existing (background) activities and close them manually, but I don't think it's possible. My guess is that you're going to have to go fishing in the undocumented stuff, which might all change tomorrow. This class looks interesting: public final class android.server.am.ActivityManagerService extends android.app.ActivityManagerNative{ It has this method, for instance: public void moveTaskToFront(int); No idea of course whether any of it's accessible. -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ --~--~-~--~~~---~--~~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---