Can I know if any activity has been lost or not, what is the correct way? Currently, I am using the following methods.
Personal volatile boolean isOnDestroyCalled = false; @ Override Safe void onDestroy () {super.onDestroy (); IsOnDestroyCalled = True; } Public Boolean isOndestoy Call () {return.isOnDestroyCalled; } Is there any other way better than the above?
This will work, but sometimes the OS will shut down your application and if it is the other time If the priority of other applications is required then it will be inactive. Of course I know that when this happens, they will eliminate the variable, not sure, though it will use instability in your case which goes to the main memory. But there is one way to ensure that you get the right value, save it in the context that is shared.
Comments
Post a Comment