title: How to read "adb shell dumpsys alarm" output
body: <p>I'm struggling with setting an alarm properly, and understanding the mechanism of cancelling and rescheduling alarms.</p>
  
  <p>I have found, that there is an adb command to retrieve all alarms scheduled on device, but I haven't found a documentation, explaining the format of the output.</p>
  
  <p>I do understand, that I'm asking a lot of explanations here, so if anybody will throw a link with detailed explanation about "adb shell dumpsys alarm", I will really appreciate it.</p>
  
  <p>So, here are the questions:</p>
  
  <ol>
  <li><blockquote>
    <p>Pending alarm batches: 23</p>
  </blockquote>
  
  <p>a. Is '23' a number of currently active, scheduled alarms?</p></li>
  <li><blockquote>
    <p>Batch{4293d3a8 num=1 start=1369361 end=1407261}: 
    <br/>&nbsp;&nbsp;RTC #0: Alarm{4293d358 type 1 com.android.chrome}
    <br/>&nbsp;&nbsp;&nbsp;&nbsp;type=1 whenElapsed=1369361 when=+19s304ms window=-1 repeatInterval=0 count=0
    <br/>&nbsp;&nbsp;&nbsp;&nbsp;operation=PendingIntent{429e4500: PendingIntentRecord{429dbbc8 com.android.chrome broadcastIntent}}</p>
  </blockquote>
  
  <p>a. What is 'num=1', 'start=1369361' and 'end=1407261'? <br/>
  b. 'RTC' stands for RTC alarm, I assume. <br/>
  c. What '#0' stand for? <br/>
  d. What means 'type=1'? <br/>
  e. Is 'when=+19s304ms' meaning that alarm will be triggered in 19 seconds? <br/>
  f. What means 'window=-1'? <br/>
  g. Is 'repeatInterval=0' meaning this is non-repeating alarm? <br/>
  h. Is 'count=0' meaning this alarm wasn't postponed, due to phone sleep state? <br/>
  i. 'operation=PendingIntent{...}' stands for the pending intent, that will be triggered by alarm, I assume. <br/></p></li>
  <li><blockquote>
    <p>Broadcast ref count: 0</p>
  </blockquote>
  
  <p>a. What is this?</p></li>
  <li><blockquote>
    <p>Top Alarms:</p>
  </blockquote>
  
  <p>a. What is this?</p></li>
  <li><blockquote>
    <p>+47s271ms running, 0 wakeups, 2 alarms: com.username.weatherinfo
    <br/>&nbsp;&nbsp;act=com.username.receivers.CyclicWeatherUpdater.WEATHER_UPDATE_ACTION
    <br/>&nbsp;&nbsp;&nbsp;&nbsp;cmp={com.username.weatherinfo/com.username.receivers.CyclicWeatherUpdater}</p>
  </blockquote>
  
  <p>a. Is '+47s271ms' meaning this alarm will be triggered in 47 seconds? <br/>
  b. What is '0 wakeups' - alarm was never triggered? <br/>
  c. What is '2 alarms'? <br/>
  d. Is 'com.username.weatherinfo' standing for name of package, that was given to pending intent in context field? <br/>
  e. Is 'act' meaning the action, that was sent for intent? <br/>
  f. What is 'cmp'? I see, that it is composed from package name and class name - but from where are they taken? From intent constructor? 
  g. Why part of the alarms have only 'act' or only 'cmp'? I have assumed, that alarms without 'cmp' fields are for implicit broadcast intents. Yet, why there are alarms without 'act' field?</p></li>
  <li><blockquote>
    <p>Alarm Stats:</p>
  </blockquote>
  
  <p>a. What is this?</p></li>
  </ol>