I know how to use handlers to update user interface elements like progress toasts, etc.
The problem I encountered is when the context goes away, for example, when you click the "Back" or "Final processing" button for any reason. This often crashes my application.
I tried using getApplicationContext () (thinking that it would be available on my entire application), but that didn't work - instead, my application crashed!
I put try catch blocks around the entire UI update code, this works, but is this necessary?
So ... What is the way to cheat?
android
jax
source share