title: BroadcastReceiver not firing when phone is sleeping
body: <p>I have a app that takes care of certain silence functions, but I can't make it work when the phone is sleeping and not connected to the computer. Everything works fine when the screen is on, but it stops working when the phone sleeps.
  Any idea what I'm doing wrong? I have checked 100 other posts here, but I just can't identify my problem.</p>
  
  <p>My Alarm manager that makes the intent:</p>
  
  <pre><code>Intent intent2 = new Intent(this, Silence.class);
  PendingIntent pendingIntent2 = PendingIntent.getBroadcast(this, 1000 + id, intent2, PendingIntent.FLAG_UPDATE_CURRENT);
  AlarmManager am2 = (AlarmManager)getSystemService(Activity.ALARM_SERVICE);
  am2.setRepeating(AlarmManager.RTC_WAKEUP, cal2.getTimeInMillis(), AlarmManager.INTERVAL_DAY * 7, pendingIntent2);
  </code></pre>
  
  <p>Broadcast Receiver:</p>
  
  <pre><code>public class MainSilenceCatcherVibrate extends BroadcastReceiver {
  
  @Override
  public void onReceive(Context context, Intent intent1) {
      WakeLocker.acquire(context);
      System.out.println("test");
      WakeLocker.release();
      }
  }
  </code></pre>
  
  <p>Manifest usage:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt; 
  &lt;receiver android:name=".Silence"&gt;&lt;/receiver&gt;
  &lt;activity android:name=".ContactActivity"&gt;&lt;/activity&gt;
  </code></pre>