SamB09
SamB09

Reputation: 171

How to set android reminder/alarm?

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?

Upvotes: 0

Views: 5002

Answers (2)

Miron Ophir
Miron Ophir

Reputation: 109

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);

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1006614

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.

Upvotes: 1

Related Questions