The content of the Intent in the BroadcastReceiver
<p>I am learning how to send SMS in android, have seen the code as below:</p>

<pre><code>public class SMSReceiver extends BroadcastReceiver
{
   @Override
   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”;
   }
    //---display the new SMS message---
   Toast.makeText(context, str, Toast.LENGTH_SHORT).show();
  }
  }
}
</code></pre>

<p>Now my question is how do I know what are the contents of Intent object that are passed into onReceive function? As below:</p>

<pre><code>Object[] pdus = (Object[]) bundle.get(“pdus”);
</code></pre>

<p>How do I know there is a "pdus" key in the bundle object?
I can't find any clue in the API doc, anyone know where is the related information located?</p>

<p>I don't only want to know what the SMS intent pass into onReceive function, but also the other system related Intent, but I can't locate any related information in the API doc. I wonder does the information really exist?</p>
