send broadcast from Service to Activity?

前端 未结 2 1235
迷失自我
迷失自我 2021-01-07 23:55

I\'m having a problem with sending a broadcast from a Service to an activity.

This is what I have in my Service class:

Intent intent = new Intent();
         


        
2条回答
  •  一个人的身影
    2021-01-08 00:35

    You have to register the broadcast receiver before it can receive anything.

    Have a look at this question.

提交回复
热议问题