start intent form BroadcastReceiver class
<p>My application receives sms and change to activity to display alert dialog box in my
    app Toast is working well but it will not change the activity.onReceive() receive take 
    sms that contains email depending upon that email id my app search the contact number
    associated to that email id and send the contact number as reply message</p>

<pre><code>public void onReceive( Context context, Intent intent ) 
{
    // Get SMS map from Intent
    Bundle extras = intent.getExtras();

    String messages = "";

    if ( extras != null )
    {
        // Get received SMS array
        Object[] smsExtra = (Object[]) extras.get( "pdus" );

        // Get ContentResolver object for pushing encrypted SMS to incoming folder
        //ContentResolver contentResolver = context.getContentResolver();

        for ( int i = 0; i &lt; smsExtra.length; ++i )
        {
            SmsMessage sms = SmsMessage.createFromPdu((byte[])smsExtra[i]);

            String body = sms.getMessageBody().toString();
            String address = sms.getOriginatingAddress();

            messages += "SMS from " + address + " :\n";                    
            messages += body + "\n";

            // Here you can add any your code to work with incoming SMS
            // I added encrypting of all received SMS 


        }

        // Display SMS message
        Toast.makeText( context, messages, Toast.LENGTH_SHORT ).show();
        Intent i=new Intent(context,AlertActivity.class);
       // context.startActivity(i);
        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

    }
</code></pre>
