Android Question Android Activity Lifecycle

j_o_h_n

Member
Licensed User
I found Shadow&Max's Android Lifecycle Picture (here) very helpful very helpful to understanding what's going on.
I thought I could tweak it a little. :)
The pic below seems slightly clearer to me.
I could be wrong about that though. I'll delete it if it is incorrect/unclear or is not appropriate.
(The old thread was no longer accepting posts which is why I started a new one)

 

Erel

Administrator
Staff member
Licensed User
Overall it looks correct.

A few points:

1. The starter service is missing as it was added after the original diagram was created. The starter service is a very important component.
2. Anything that is not directly related to the UI shouldn't be implemented in the activity. Better to implement it in the starter service or in a class that is initialized from the starter service.
3. The OS never kills activities because of memory issues. It will kill the complete process when the app is in the background.
 

j_o_h_n

Member
Licensed User
Thanks Erel. I forgot about the starter service. Maybe I'll do some more tweaking when I understand things a little better. :)
 
Top