Hi! I have an Android service which sends broadcast intents. I'm trying to get those intents in another application, which is an Android service. I wrote this in my manifest:
<!-- Service -->
<service android:enabled="true" android:name="...MyService"></service>
<!-- Receiver -->
<receiver android:name="...MyReceiver">
<intent-filter>
<action android:name="..."></action>
<action android:name="..."></action>
</intent-filter>
</receiver>
and this in my MyReceiver class:
public class ScannerBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
// Process action.
Log.d(Globals.LOG_TAG, "Intent received.");
...
Unfortunately I never get the onReceive method invoked. Any idea why? I start this service from another test application, so this is set as an Android library. The service is correctly started but this receiver is receiving nothing. Any idea what I'm doing wrong? Thanks!