title: AlarmManager killing scheduled alarm
body: <p>I want to make a daily notification but my app is getting killed in alarmManager</p>
  
  <p>code:</p>
  
  <pre><code>if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {
          alarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP,
                  SystemClock.elapsedRealtime() + (60 * 1000 * 5),
                  alarmIntent);
      } 
  }
  </code></pre>
  
  <p>I have been watching the alarmManager contents using adb command <code>"adb shell dumpsys alarm &gt; dump.txt"</code></p>
  
  <p>Its there when it starts but when my phone goes to deep sleep the scheduled alarm disappears.</p>
  
  <p>When I lower the value to 1 minute, the intent triggers but with a longer time the alarm disappears.</p>
  
  <p>I'm guessing this has something to do with battery optimizations on deep sleep?</p>
  
  <p>Anyone know how to get around this?</p>