title: How to bypass Doze mode and batching at the same time using AlarmManager?
body: <p>I'm trying to deliver notifications in my app at specific times.
  I know about Doze and how nothing bypasses its restrictions except AlarmManager.setAlarmClock() because even <a href="https://stackoverflow.com/questions/33110246/setexactandallowwhileidle-is-not-exact-as-of-developer-reference">even setExactAndAllowWhileIdle</a> is not really exact.
  I really hoped I could deliver the notifications on time if I use setAlarmClock however it looks like even this method doesn't guarantee you precision.</p>
  
  <p><a href="https://stackoverflow.com/questions/39363500/setalarmclock-not-exact-in-android-marshmallow">setAlarmClock not exact in android marshmallow</a></p>
  
  <p>So as I understand there are two different kinds of batching occurs when it comes to alarms. The general one occurs above api level 18 and the other occurs during Doze which happens in above api level 23. Please correct me if I'm wrong on this.
  <strong>If this is true then how am I able to by avoid both and deliver the notification at the exact time I set it to?</strong>
  Also I had a look at <a href="https://github.com/evernote/android-job" rel="nofollow noreferrer">this library</a> which does the api level based branching for me however it still use methods like setExactAndAllowWhileIdle which is not exact as I mentioned it above. </p>
  
  <p>PS:<a href="http://pguardiola.com/blog/darealfragmentation-alarms/" rel="nofollow noreferrer">this</a> article and <a href="http://pguardiola.com/blog/darealfragmentation-doze/" rel="nofollow noreferrer">its continuation</a> explain this stuff well.  </p>