application not going to intent part
<p>this is my application code below which nto going to intent part i used debug i find is not going after line 
xmlResponse2[0][i]=test[i];
wht i mistake?? can anyone help me is not launch any activity and code broke after 
xmlResponse2[0][i]=test[i];   this line</p>

<pre><code>  public void onReceive(Context context, Intent intent) 
{
    //---get the SMS message passed in---
    Bundle bundle = intent.getExtras();        
    SmsMessage[] msgs = null;
    String str = "";  

    if (bundle != null)
    {
        //---retrieve the SMS message received---
        Object[] pdus = (Object[]) bundle.get("pdus");
        msgs = new SmsMessage[pdus.length];            
        for (int i=0; i&lt;msgs.length; i++){
            msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]);                
            str += "SMS from " + msgs[i].getOriginatingAddress();                     
            str += " :";
            str += msgs[i].getMessageBody().toString();
            str += "\n";  



        String[][] xmlResponse2= null;
        String[] test = str.split("\n");
        xmlResponse2= new String[0][test.length];
        for (int i = 0; i &lt; test.length; i++) {
            xmlResponse2[0][i]=test[i];
             Intent l = new Intent(context,AgAppMenu.class);
             l.putExtra("msg",xmlResponse2);
             l.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);   
             context.startActivity(l);
        }

        //---display the new SMS message---
        Toast.makeText(context, str, Toast.LENGTH_SHORT).show();
</code></pre>
