You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.
hi, i face an issue on life cycle. In my case, i have two Activity and Three fragments.
i have a singleton SpiceManager in Application.
Each Fragment onStop function look like: @OverRide
public void onStop() {
// Please review #96 for the reason of that
// ugly if statement.
if (getBaseActivity().getSpiceManager().isStarted()) {
getBaseActivity().getSpiceManager().shouldStop();
}
super.onStop();
}
The scenario:
Activity A -- open --> Fragment A ---- Open -----> Fragment B ----Start ---> Activity B --- Open ---> Fragment C
In Fragment C, i call restful API in onCreate function. But, sometimes no response.
I found that the main issue is that, when Activity A switch to Activity B.
Fragment C will create first. And then Fragment B will call onStop and stop the SpiceManager. That's why Fragment C cannot get response.
I would like to ask how to use SpiceManager on Many Activity with Fragments Design to avoid this issue.
The text was updated successfully, but these errors were encountered:
hi, i face an issue on life cycle. In my case, i have two Activity and Three fragments.
i have a singleton SpiceManager in Application.
Each Fragment onStop function look like:
@OverRide
public void onStop() {
// Please review #96 for the reason of that
// ugly if statement.
if (getBaseActivity().getSpiceManager().isStarted()) {
getBaseActivity().getSpiceManager().shouldStop();
}
super.onStop();
}
The scenario:
Activity A -- open --> Fragment A ---- Open -----> Fragment B ----Start ---> Activity B --- Open ---> Fragment C
In Fragment C, i call restful API in onCreate function. But, sometimes no response.
I found that the main issue is that, when Activity A switch to Activity B.
Fragment C will create first. And then Fragment B will call onStop and stop the SpiceManager. That's why Fragment C cannot get response.
I would like to ask how to use SpiceManager on Many Activity with Fragments Design to avoid this issue.
The text was updated successfully, but these errors were encountered: