android - JAR register BroadcastReceiver -


my broadcastreceiver class name net.push.myreceiver

and mainfest in jar:

<receiver android:name="net.push.myreceiver" >             <intent-filter>                 <action android:name="myreceiver_action" />             </intent-filter>         </receiver> 

and register broadcastreceiver,receiver can not receive broadcast.

if change mainfest below:

<receiver android:name="net.push.myreceiver" >             <intent-filter>                 <action android:name="myreceiver_action" />             </intent-filter>         </receiver> 

then can receive broadcast.

i wonder how can receive broadcast while register mainfest in jar.

androidmanifest.xml specified application not jar. so, if want receiver work, need put declaration in application manifest should located in root of application project folder.

every application must have androidmanifest.xml file (with precisely name) in root directory

more read here: http://developer.android.com/guide/topics/manifest/manifest-intro.html


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -