I am trying to register a Broadcast Receiver to receive broadcast events for the package events. Following is the code and my receiver in the manifest file. The log statment never happens, but I can clearly see the same broadcast firing for "HomeLoaders" (the Launcher) debug statements. What am I missing?
public class IntentListener extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
Log.i("INTENT LISTNER:", intent.getAction());
}
}
<receiver android:name="IntentListener" android:enabled="true" android:exported="true">
<intent-filter>
<data android:scheme="package"></data>
<action android:name="android.intent.action.PACKAGE_ADDED"></action>
<action android:name="android.intent.action.PACKAGE_ADDED"></action>
<action android:name="android.intent.action.PACKAGE_CHANGED"></action>
</intent-filter>
</receiver>
It is possible that these Intent
s cannot be received by components registered in the manifest, but only by receivers registered in Java via registerReceiver()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With