简体   繁体   中英

How do I remove a reminder from an event so it updates the event in the provider not just the sqlite db?

I tried deleting a reminder for an event by using this code:

int result = getContentResolver().delete(
Reminders.CONTENT_URI, 
Reminders.EVENT_ID + " = ?",
new String[] { "44" }
);

This shows it deleted 1 row. However, when I view the event in the calendar app, the reminder is still there. Even if I updated the "hasAlarm" field, I don't think it will update the event in Exchange. How do I properly (using Ice Cream Sandwich - API 14 - or later) remove a reminder from a calendar event?

Instead of deleting , try with update query , it works . IF it doesn't work lemme know i'll try to help with code snippet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM