How to wake up device using Alarm clock?
<p>I use the following code for setting repeating events in <code>AlarmManager</code>:</p>

<pre><code>mAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 
    PERIOD, getPendingIntent(time));
</code></pre>

<p>Code for receiver:</p>

<pre><code>public class NotificationsReceiver extends BroadcastReceiver {
    public static final String NOTIFICATION_INFO="notification_info";

    @Override
    public void onReceive(Context context, Intent intent) {
       playSound(context);
       Intent i=new Intent(context, MainActivity.class);
       i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
       context.startActivity(i);
    }

    private void playSound(Context context) {
        Uri notification=RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
        RingtoneManager.getRingtone(context, notification).play();
    }
}
</code></pre>

<p>There is some problem - I need to play music when the event happens, but if my device is in sleeping I don't hear any signal! But when I wake up device I hear music. How can I fix it? </p>
