Skip to content Skip to sidebar Skip to footer

Alarmmanager Not Invoking The Task?

I want to execute a auto-logout after 10 PM everyday in my application, for that that I have implemented a AlarmManager task but it is not invoking .For testing purpose I have give

Solution 1:

Change and set right time for 10 PM in your Calendar object:

Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY,21);
calendar.set(Calendar.MINUTE,59);
calendar.set(Calendar.SECOND,59);

Solution 2:

Did you put

<receiver android:name=".AutoLogoutRecevier" />

in your manifest?

Post a Comment for "Alarmmanager Not Invoking The Task?"