Android闹铃麻烦

| 我正在Android上制作一个简单的提醒应用。 我有一个日期,例如27-06-2011(DD-MM-YY),我希望在该日期(上午12:01)创建一个警报。 我知道这是可能的,但这有多容易?     
已邀请:
        Google的简单答案:
Intent intent = new Intent(this, RepeatingAlarmReceiver.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, REQUEST_CODE, intent, 0);

AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (5 * 1000), 10 * 1000, pendingIntent);
Toast.makeText(this, \"Alarm set\", Toast.LENGTH_LONG).show();
如果需要使用提到的日期,请创建一个时间对象,使用其构造函数设置字段并使用time.toMillis(false);。为警报管理器获取正确的参数。 问候,  斯特凡     

要回复问题请先登录注册