问题
I have got some times stored in ISO format. Some of these times are flagged to either 1(on) or 0(off) set in another column. I need to set a reminder at the times flagged to 1, but how would I pass that each date to the reminder class?
回答1:
There is no public API for the Alarm Clock application.
There is no public API for the Calendar application, though since it is a native UI for a Google Calendar, you could push an event over to the Google Calendar via its GData API.
回答2:
ContentValues reminderContentValues = new ContentValues();
reminderContentValues.put(FIELD_REMINDER_EVENT_ID, eventId);
reminderContentValues.put(FIELD_REMINDER_METHOD, 1);
reminderContentValues.put(FIELD_REMINDER_MIN, minutesBefore);
mContext.getContentResolver().insert(getRemindersUri(), reminderContentValues);
来源:https://stackoverflow.com/questions/2189244/how-to-set-android-reminder-alarm