-
Notifications
You must be signed in to change notification settings - Fork 34
Automatic lifecycle management #5
Comments
Yes, having it kill or stop itself is a great idea, ping me if you need any help, but I can see you are doing great already! |
Haha...thanks. Though I'll create another pull for the documentation... |
Great |
I've been considering this... @jumadeveloper help me with this... I'd like to hear your take on the matter. Any other perspective. |
@chweez I think we should make it handle the lifecycle automatically, by somehow receiving the lifecycle event of the parent, as you had stated earlier when creating the issue to reduce code setup needed by the user |
@chweez I have an idea, we can use |
I've been looking at this. I have a concern for including the |
@chweez I completely agree with you |
For now, the user must call
Tovuti.from(context).stop()
but i want to make it automatic when theActivity
/Fragment
stops.So, the way Glide implements this feature is by having a view-less
Fragment
. The view-less fragment is attached to the activity/fragment where theMonitor
is attached and theseFragment
receives the lifecycle events of the parent/host thus allowing theMonitor
to respond accordingly without user intervention (i.e. calling stop method).I'll try see if this way will suit us. The only problem is increasing the complexity of the library unnecessarily. What do you think @jumadeveloper?
The text was updated successfully, but these errors were encountered: