[Android] AlarmManager ÀÏÁ¤½Ã°£ À̺¥Æ® ½ÇÇà |
|
|
 |
8³â Àü |
public void registerAlarm()
{
Log.e("###", "registerAlarm");
Intent intent = new Intent(this, AlarmService_Service.class);
PendingIntent sender = PendingIntent.getBroadcast(this, 0, intent, 0);
try
{
// ³»ÀÏ ¾Æħ 8½Ã 10ºÐ¿¡ óÀ½ ½ÃÀÛÇؼ, 24½Ã°£ ¸¶´Ù ½ÇÇàµÇ°Ô
Date tomorrow = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").parse("2012-02-25 08:10:00");
AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
am.setInexactRepeating(AlarmManager.RTC, tomorrow.getTime(), 24 * 60 * 60 * 1000, sender);
} catch (ParseException e)
{
e.printStackTrace();
}
} |
|
̵̧ : 323 |
̵̧
¸ñ·Ï
|
|