date
forAlaramManager
を設定する次のコードがあります。
AlarmManager alarm = (AlarmManager)getSystemService(Service.ALARM_SERVICE);
int mYear = 2012;
int mMonth = 5;
int mDay = 26;
int mHour = 12;
int mMinute = 34;
Date dateNotif = new Date (mYear - 1900, mMonth, mDay, mHour, mMinute);
Long myDate = dateNotif.getTime();
Long current = System.currentTimeMillis();
Intent i = new Intent(getApplicationContext(),ShowNotificationService.class);
PendingIntent pendingIntent = PendingIntent.getService(getApplicationContext(), 12345,i, 0);
alarm.set(AlarmManager.RTC_WAKEUP, dateNotif.getTime(), pendingIntent);
エミュレーターの時間が12:34
何もないときは、通知用に表示されます