title: Make AlarmManager Repeats alarm for a specific number of time - Android
body: <p>I need to set an alarm at perticular time that repeats given number of time only.</p>
  
  <p>There is </p>
  
  <pre><code>void set(int type, long triggerAtTime, PendingIntent operation)
  </code></pre>
  
  <p>It gets called for once. I can check preference value and can set it again for my requirement.</p>
  
  <p>I can use this also. At every alarm trigger can check preference value and if limit achieved. Can cancel alarm then.</p>
  
  <pre><code>void setRepeating(int type, long triggerAtTime, long interval, PendingIntent operation)
  </code></pre>
  
  <p>I want to avoid this preference stuff within this operation. </p>
  
  <p>Are there other ways of doing this ? </p>