Android‎ > ‎

Broadcast Reciever : Scope

posted Feb 19, 2013, 5:12 AM by Akash Khaitan   [ updated Mar 9, 2013, 7:24 AM ]
Case 1:
Broadcast receiver and sender are in same package, there is no need to register the receiver in Mainfest.

Case 2 :
Broadcast receiver and sender in separate packages
In the package where broadcast receiver is present, register a reciever in mainfest like below
 <receiver android:name=".MyReciever"
             android:enabled="true"
              android:exported="true">
            <intent-filter>
               
                <action android:name="Name Of Action sent by the sender" >
                    </action>
            </intent-filter>
        </receiver>


Comments