Android Question Android Activity Lifecycle

j_o_h_n

Active 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)

k0ho61.png
 

Erel

B4X founder
Staff member
Licensed User
Longtime 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.
 
Upvote 0

j_o_h_n

Active 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. :)
 
Upvote 0
Top