I have a background service that monitors foreground apps. It's used to protect a certain app such that if the protected app is in the foreground and then pushed to the background because another app started, it would show the user a notification that another app has taken over as the foreground app.
I'm able to detect the switch, but is there any way to display a Toast notification/AlertDialog to alert the user in the service after detection?