In my activity there's some stuff going on in a background thread, which gets started in Activity_1. The processing of the background thread takes a while and I want to notify the user when it's completed via an AlertDialog
. However, the user might have changed to Activity_2 or Activity_3 in the meantime and I would like to pop up the AlertDialog always in the current Activity.
Any idea how to realize this?
I ended up doing something like this in my background thread. It works, but not sure if it is a "good" solution.
Looper.prepare();
mActivity.showDialogAlertDefault();
Looper.loop();
Looper.myLooper().quit();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With