My app have a background service that detect objects via bluetooth, and I want to show a dialog in the current activity (Logic to detect app in foreground or background is done) when a BT object is detected. I read about BroadcastReceiver class, but I don't know how can send data from my service to a broadcast for my current activity to show a Dialog in the Activity.
If you know another solution that will be ok