Restricting Android Broadcast Receiver from specific app

后端 未结 1 1973
渐次进展
渐次进展 2020-12-15 01:50

I have 2 applications.
If I use service, I can set permission so only app1 can send intent to app2:
Define permission in app2

1条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 02:18

    The tag can also define what permission the broadcasters should have, see http://developer.android.com/guide/topics/manifest/receiver-element.html#prmsn

    I means you can protected your receiver from unauthorized broadcasts by coding like this:

    ...
    
    
    ...
    
    
        
            
        
    
    ...
    

    0 讨论(0)
提交回复
热议问题