title: What's "requestCode" used for on PendingIntent?
body: <p><strong>Background:</strong></p>
  
  <p>I'm using PendingIntent for alarms via AlarmManager.</p>
  
  <p><strong>The problem:</strong></p>
  
  <p>At first I thought that in order to cancel previous ones, I must provide the exact requestCode that I've used before to start the alarm.</p>
  
  <p>But then I've found out I was wrong, as the <a href="http://developer.android.com/reference/android/app/AlarmManager.html#cancel%28android.app.PendingIntent%29" rel="noreferrer"><strong>cancellation API</strong></a> says:</p>
  
  <blockquote>
    <p>Remove any alarms with a matching Intent. Any alarm, of any type,
    whose Intent matches this one (as defined by filterEquals(Intent)),
    will be canceled.</p>
  </blockquote>
  
  <p>looking at "<a href="http://developer.android.com/reference/android/content/Intent.html#filterEquals%28android.content.Intent%29" rel="noreferrer"><strong>filterEquals</strong></a>", the documentation says:</p>
  
  <blockquote>
    <p>Determine if two intents are the same for the purposes of intent
    resolution (filtering). That is, if their action, data, type, class,
    and categories are the same. This does not compare any extra data
    included in the intents.</p>
  </blockquote>
  
  <p>so I don't get what the "requestCode" is for...</p>
  
  <p><strong>The question:</strong></p>
  
  <p>What is "requestCode" used for?</p>
  
  <p>What if I create multiple alarms with the same "requestCode" ? do they override each other?</p>