I’d like to pass some data from a foreground activity to another that is currently in background.
I know that I can use setResult()/onActivityResult() and startActivity()/getIntent() to send an Intent with data while an Activity opens/closes, but in this case this does not seem to be usable.
Is there any way other than using static methods or fields?
BroadcastReceiver (registering it in onCreate and unregistering it in onDestroy) was exactly what I was looking for.