Start new Activity From BroadcastReceiver or Service Class
<p>Hello have to start a new Activity from the BroascastReceiver or the Service, but I have found error that cant start activity without activity context.</p>

<p>I use the following code</p>

<pre><code>Intent i=new Intent(this,MyActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
</code></pre>

<p>And also include the activity in Mainifest file,</p>

<p>Please resolve it,</p>

<p>And another second problem is, I start a service inside the BroadcastReceiver but this Service finish when BroadcastReceiver lifecycle completes. I want to keep alive the Serive</p>

<p>Please help me on this</p>
