Although you can declare "Local" BroadcastReceiver through code so that it receives intentions published through LocalBroadcastManager.Ex
LocalBroadcastManager.getInstance(this).registerReceiver(new FooReceiver(), new IntentFilter("foo_intent_filter"));
I wonder if such a receiver can be declared using the .xml manifest (cleaner).
When I use the "manifest method", the receiver does not accept intentions.
<receiver android:name="FooReceiver" android:enabled="true" android:exported="false" > <intent-filter> <action android:name="foo_intent_filter" /> </intent-filter> </receiver>
Am I missing something? or path code is the only viable solution.
thanks
android broadcastreceiver
Jesus monzon legido
source share