Let's step back a little bit. Ted, what is it you are trying to do? On Wed, Jun 2, 2010 at 1:24 AM, Guillaume Perrot <guillaume.p...@gmail.com> wrote: > I already made something similar (limited to the current activity) and > I did not find another way to access the activity instance. > To limit errors, I made my modifications in life cycle callbacks and > users have to inherit my Activity classes (I made a full set for > convenience, there are 9 Activity types) instead of the standard ones. > You could place your code in onCreate, if they inherit your class they > can't miss it. > Of course the developer still have to ensure it does not miss an > inheritance change but it's easier than adding a snippet of code > everywhere and more object friendly. > > On 2 juin, 08:35, "Ted Neward" <ted.new...@gmail.com> wrote: >> Anybody know an easy way for an app to find all the instances of all the >> Activities currently alive in the current process? >> >> Yes, I could register each one into a static List<> someplace from the >> constructor of each Activity, but that requires developers to remember to >> put that code into every Activity constructor, which is going to eventually >> miss one or two (not to mention keep the Activity alive longer than it >> should be, though that could be fixed by holding WeakReferences instead of >> strong ones, but that still misses the point), and that's going to mean one >> or two escape the list. I'd prefer to have a way to see all of them from >> Android's/Dalvik's point of view. >> >> Ted Neward >> >> Java, .NET, XML Services >> >> Consulting, Teaching, Speaking, Writing >> >> <http://www.tedneward.com>http://www.tedneward.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 > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en >
-- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en