你好,
我使用以下代码片段在使用 AlarmManager 的延迟后调用操作。但是警报会立即被调用。
AlarmUtility.java
public void setAlarm(Context context) {
AlarmManager am = (AlarmManager) context
.getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent(context, AlarmReceiver.class);
PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
am.setRepeating(AlarmManager.RTC_WAKEUP, 1000 *24*3600,
1000 *24*3600, pi); // Millisec * Second * Minute
} // trying to first trigger the alarm after 24 hrs and repeat after 24 hours
请让我知道我的错误是什么