Broadcasting intents from a remote process service

271 views Asked by At

I have a service that is defined to run on it's own process:

<service
            android:name="com.package.MyService"
            android:enabled="true"
            android:process=":remote">

and I have a class that runs that service:

Intent intent = new Intent(context, MyService.class);
        intent.setAction(Constants.ACTION);
        context.startService(intent);

I am trying to broadcast an Intentas following:

Intent broadcastIntent = new Intent(RECEIVER);
        broadcastIntent.setAction(action);
        broadcastIntent.putExtra(DATA, msg);
        sendBroadcast(broadcastIntent);

here I declare my receiver:

private final BroadcastReceiver receiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            //doSomething
    };

but it seems like the onReceive is never called

0

There are 0 answers