android - Broadcasting intents from a remote process service -
i have service defined run on it's own process:
<service android:name="com.package.myservice" android:enabled="true" android:process=":remote">
and have class runs service:
intent intent = new intent(context, myservice.class); intent.setaction(constants.action); context.startservice(intent);
i trying broadcast intent
as following:
intent broadcastintent = new intent(receiver); broadcastintent.setaction(action); broadcastintent.putextra(data, msg); sendbroadcast(broadcastintent);
here declare receiver:
private final broadcastreceiver receiver = new broadcastreceiver() { @override public void onreceive(context context, intent intent) { //dosomething };
but seems onreceive never called
Comments
Post a Comment