Android BroadcastReceiver with no intent-filter

前端 未结 4 542
孤独总比滥情好
孤独总比滥情好 2021-01-01 22:43

I\'ve come across something like this in the AndroidManifest.xml:


The above

4条回答
  •  失恋的感觉
    2021-01-01 23:26

    tag will say to android os that i am reciver that's it. it wont say for what event it's intended to listen. Your intent filter will define, for which event you are listning for. for example,

    
        
            
        
    
    

    this code says to android os that, i am receiver and i am listing to boot event. So when user will restart his phone, this brodcast receiver will be called.

提交回复
热议问题