title: AlarmManager does never work
body: <p>I see all the questions and answers but i didn't find a solution to my problema. My Alarm (or PendingIntent) is never fired. Here is my code:</p>
  
  <p><strong>Manifest</strong></p>
  
  <pre><code>    &lt;receiver
          android:name=".colorevent.receiver.ConfigureEventAlarmsReceiver"
          android:exported="false"
          android:process=":remote" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="iupix.mobile.CONFIGURE_EVENT_ACTION"/&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  </code></pre>
  
  <p><strong>Alarm creation</strong></p>
  
  <pre><code>AlarmManager alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
  
  Bundle extras = new Bundle();
  extras.putInt(ConfigureEventAlarmsReceiver.EVENT_ID, 1);
  
  Intent intent = new Intent(context, ConfigureEventAlarmsReceiver.class);
  PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 1, intent, PendingIntent.FLAG_ONE_SHOT);
  
  Calendar time = Calendar.getInstance();
  time.add(Calendar.SECOND, 10);
  
  if(Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {
      alarmMgr.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, time.getTimeInMillis(), pendingIntent);
  }else if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.KITKAT) {
      alarmMgr.setExact(AlarmManager.RTC_WAKEUP, time.getTimeInMillis(), pendingIntent);
  }else{
      alarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, time.getTimeInMillis(), pendingIntent);
  }
  </code></pre>
  
  <p><strong>Broadcast Receiver</strong></p>
  
  <pre><code>public class ConfigureEventAlarmsReceiver extends BroadcastReceiver {
  
      public static final String CONFIGURE_EVENT_ACTION = "iupix.mobile.CONFIGURE_EVENT_ACTION";
  
      public static final String EVENT_ID = "EVENT_ID";
  
      @Override
      public void onReceive(Context context, Intent intent) {
          if(intent.getAction() != null &amp;&amp; intent.getAction().equals(CONFIGURE_EVENT_ACTION)) {
              Bundle extras = intent.getExtras();
  
              if(extras != null) {
                  if(extras.containsKey(EVENT_ID)) {
                      int eventId = extras.getInt(EVENT_ID);
                      this.configureAlarmsForEvent(context, eventId);
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>Any ideas? Please, I don't know really what to do.</p>
  
  <p>Thank you!</p>