Usage of sendBroadcast()

前端 未结 2 1800
眼角桃花
眼角桃花 2021-01-01 21:25

sendBroadcast() - Should it be called inside Activity? I am trying to call sendBroadcast() from my method of utility-class which doesn\'t extend Activity. I am getting compi

2条回答
  •  暖寄归人
    2021-01-01 22:15

    If you extend Application object (main entry that is being called before the your first Activity) then you can keep a shared singletone for your application.

提交回复
热议问题