How to send and receive broadcast message

前端 未结 3 1834
清歌不尽
清歌不尽 2020-12-02 18:08

I am trying to pass data between two activities that are inside of tabs. I am trying to use sendBroadcast(). With breakpoints set I never reach onReceiv

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 18:38

    I was having the same problem as you, but I figured out:

    Remove the intent filter from the manifest and change

    Intent intent=new Intent(getApplicationContext(),WebResults.class);
    

    for

    Intent intent=new Intent();
    

    Hope it helps!

提交回复
热议问题