G
G
geron2016-01-14 13:27:37
Android
geron, 2016-01-14 13:27:37

Is it possible to call AlertDialog from a service?

The application has an IntentService that saves data on the server via a web service. After a successful or unsuccessful save, the user needs to be informed of the result. I already had such a problem and I solved it like this. In one of the services, I call AlertDialog using BroadcastReceiver, the service fulfills, sends a BroadcastReceiver message, and BroadcastReceiver calls AlertDialog. How correct is this approach?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Copperfield, 2016-01-14
@geronix

Veren. BroadcastReceiver can be replaced with LocalBroadcastManager , or even easier with EventBus

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question