AlarmManager not working in sleep mode in android
<p>I have set an AlarmManagr with a repeat time. Here is my method by which I am setting it:</p>

<pre><code>public void setAlarmManager(Context context, Intent intent){

        PendingIntent pendingIntent;
            pendingIntent  = PendingIntent.getService(context, 0, intent, 0);

 AlarmManager alarmManager=(AlarmManager)context.getSystemService(context.ALARM_SERVICE);

                   Calendar calendar = Calendar.getInstance();
                   calendar.setTimeInMillis(System.currentTimeMillis());
                   calendar.add(Calendar.SECOND, 10);
                   alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), 40000, pendingIntent);

            }
</code></pre>

<p>its working fine , but when my device goes into a sleep mode then the alarm manager is not working until I awake my device manually. After awaking it the alarmmanager start again working fine. How to keep this running even in sleep mode?</p>
