Created
March 14, 2013 13:59
-
-
Save felipecaldas/5161538 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<service | |
android:name=".NotifyService" | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" > | |
</service> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Calendar calendar = Calendar.getInstance(); | |
calendar.set(Calendar.SECOND, 0); | |
calendar.set(Calendar.MINUTE, 0); | |
calendar.set(Calendar.HOUR, 0); | |
calendar.set(Calendar.AM_PM, Calendar.AM); | |
calendar.add(Calendar.DAY_OF_MONTH, 1); | |
Intent myIntent = new Intent(this , NotifyService.class); | |
AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE); | |
PendingIntent pendingIntent = PendingIntent.getService(this, 0, myIntent, 0); | |
alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment