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
I saw that the SugarApp class relies on the onTerminate lifecycle method.
You can just remove the code from inside this method as it will never be called:
This method is for use in emulated process environments. It will never be called on a production Android device, where processes are removed by simply killing them; no user code (including this callback) is executed when doing so. from Android Developer
The text was updated successfully, but these errors were encountered:
Nice find! Just to clarify, when you say "emulated process environments", does that include the emulator that comes, for instance, with Eclipse or Android Studio? Or even something like Genymotion? Would appreciate some feedback on this.
The official Android Emulator is one of those "emulated process environments".
I do not know about Genymotion and external other products though, sorry.
It would seem like the best thing to do is to leave it there then. Since there are some environments where the database is not automatically cleaned up and released, then having it there could have some benefit without doing any harm. At the very least though, I hear what you're saying, and there should be a comment there telling the developer that onTerminate is only called in emulation environments. I'll close this issue when that comment is added to master.
I saw that the SugarApp class relies on the onTerminate lifecycle method.
You can just remove the code from inside this method as it will never be called:
This method is for use in emulated process environments. It will never be called on a production Android device, where processes are removed by simply killing them; no user code (including this callback) is executed when doing so.
from Android Developer
The text was updated successfully, but these errors were encountered: