Extend Activity, override all lifecycle events and use those to log them 
(use a specific tag for them, will be easier to follow when you filter for 
that tag), replace all your activities with the extended class.
I've found some interesting behaviors using this scheme, very helpful. 


On Friday, March 29, 2013 11:16:53 PM UTC+3, plnelson wrote:
>
> Over many projects I've run into various problems with Activities doing 
> mysterious things.   I've had them not start; I've had onActivityResult not 
> get called when I'm trying to send parameters back from an Activity; I've 
> had onActivityResult get called *instantly* before the other Activity 
> even got created.    Googling the web I see that lots of people have these 
> problems and often these either stump people on StackOverflow or result in 
> random "superstitious" fixes with no obvious basis - even if they sometimes 
> seem to work.
>  
> So* My Question*:  is there any *systematic* way to debug Activity 
> life-cycle problems - are there log files, traces, dumps, or anything that 
> programmers can use to figure out why something is happening.    If I call 
> "startActivity" and the activity is never created or started, is there 
> anyplace Android tells us why?   If onActivityResult is called prematurely 
> (i.e., before the Activity that's supposed to return the result even 
> exists) how can we find out why it was called?     Are there any hints of 
> tricks to interpreting the call stack that can shed light on that?
>
> Thanks in advance for any tips or tricks.
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to