D
D
Dmitry Yunushkin2014-11-16 17:47:42
Java
Dmitry Yunushkin, 2014-11-16 17:47:42

How to send a message from one service to two or more activities?

There is a service, it sends to activation through Message and
Handler. If I add a second activity and try to send a message through the same service to the first and second activities, the whole phone dies and it can only be revived after a reboot. I am making a second Handler. Is it possible to send a message from one service to different activities and how do normal people do it?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
basnopisets, 2014-11-17
@basnopisets

Why send messages to two activities? It is visible and works at one point in time, after all, only one activity ?! In general, to send messages to more than one recipient, there is a sendBroadcast () method and, accordingly, BroadcastReceiver

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question