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
When the environment is switched, the problem of Token failure often occurs, and it is troublesome to login again each time. Therefore, by adding the function of saving the username and password during Debug, you can automatically login again in the onEnvironmentChange callback.
The text was updated successfully, but these errors were encountered:
If the re-requested interface needs token after the environment switch, you can request it after delaying the postDelay.
@Override
public void onEnvironmentChanged(ModuleBean module, EnvironmentBean oldEnvironment, EnvironmentBean newEnvironment) {
long delayTime = 1500;
handler.postDelayed(new Runnable() {
@Override
public void run() {
// Send a request that requires a token parameter
}
}, delayTime);
}
CodeXiaoMai
changed the title
Save username and password when debugging
When the environment is switched, the problem of Token failure often occurs
Sep 6, 2018
When the environment is switched, the problem of Token failure often occurs, and it is troublesome to login again each time. Therefore, by adding the function of saving the username and password during Debug, you can automatically login again in the onEnvironmentChange callback.
The text was updated successfully, but these errors were encountered: