android - How to Set BroadcastReceiver Permissions (Security) -


so have 2 apps - , b.

in have broadcastreceiver. in receiver tag (manifest file) specify android:permission string (let's com.example.app.send). b cannot send broadcasts anymore. makes sense!

so have in order b send broadcasts ? in b's manifest, specified uses-permission tag android:name set same string (com.example.app.send) receiver's android:permission still broadcasts won't go b a.

what doing wrong ? or there else needs done ?

-- update --

here's app a's receiver tag:

    <receiver         android:name="com.example.app.myreceiver"         android:enabled="true"         android:exported="true"         android:permission="com.example.breceiver.send" >         <intent-filter>             <action android:name="com.example.breceiver" />         </intent-filter>     </receiver> 

and here's uses-permission tag b's manifest:

<uses-permission android:name="com.pycitup.breceiver.send" /> 

so i'd set custom permission same string in b's manifest:

<permission android:name="com.pycitup.breceiver.send" /> 

was quite straight-forward , simple. required bit of reading across web.


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -