Invoke custom broadcastreceiver for another app
<p>I have 2 apps, App1 and App2</p>

<p>In App1, manifest file has BroadcastReceiverIncoming defined as below.</p>

<pre><code>&lt;receiver android:name="packagename.BroadcastReceiverIncoming"  android:enabled="true"     android:exported="true"&gt;
    &lt;intent-filter&gt;
        &lt;action android:name="packagename.BroadcastReceiverIncoming" /&gt;
    &lt;/intent-filter&gt;
 &lt;/receiver&gt;
</code></pre>

<p>BroadcastReceiverIncoming is defined in App1.</p>

<p>Now in App2, I am calling this to invoke broadcast receiver but it's now working somehow?</p>

<pre><code>1.Intent intent = new Intent();
2.intent.setClassName("packageName","packagename.BroadcastReceiverIncoming");
3.intent.setAction("packagename.BroadcastReceiverIncoming");
4.appContext.sendBroadcast(intent);
</code></pre>

<p>Even with line 2 commented/uncommented, it does not invoke BroadcastReceiverIncoming.</p>

<p>Through adb if I call "adb shell am broadcast -n packageName/packagename.BroadcastReceiverIncoming""
BroadcastReceiverIncoming is being invoked correctly in App1.</p>

<p>Please help.</p>
