我有一個應用程序,有一個報警系統,工作flawleslesly,我複製所有5類,只是改變數據庫名稱,但它; s不工作,我可以通過你所有的代碼,但我想聽聽有沒有人有過這樣的事情。Androids AlarmManager不會觸發鬧鐘
當我調用新的ReminderManager(this).setReminder(mRowId,mCalendar);
rowID已滿(有些數字)和mCalendar(有一個日期,我與另一個應用程序的Mcalendar的日期相比,它是相同的格式),當我打電話時,它應該createse掛起的意圖
public void setReminder(Long taskId, Calendar when)
{
Intent i= new Intent(mContext,OnAlarmReciver.class);
i.putExtra(DatabaseIN.KEY_ROWID,(long)taskId);
PendingIntent pi=PendingIntent.getBroadcast(mContext,0, i, PendingIntent.FLAG_ONE_SHOT);
mAlarmManager.set(AlarmManager.RTC_WAKEUP,when.getTimeInMillis(),pi);
}
after this nothing happens... can anyone help
謝謝,真的幫了我 – Tony 2012-03-11 13:11:30