मैंने एंड्रॉइड कैलेंडर से सभी प्रविष्टियों को हटाने के लिए सरल कोड लिखा, लेकिन यह कुछ भी नहीं हटाया।कैलेंडर प्रविष्टियां हटाएं
स्रोत कोड:
public void DeleteEvent(View view){
int iNumRowsDeleted = 0;
Uri eventsUri = Uri.parse("content://com.android.calendar/events");
Cursor cur = getContentResolver().query(eventsUri, null, null, null, null);
while (cur.moveToNext()){
long id = cur.getLong(cur.getColumnIndex("_id"));
Log.d(TAG, "ID: " + id);
Uri eventUri = ContentUris.withAppendedId(eventsUri, id);
iNumRowsDeleted = getContentResolver().delete(eventUri, null, null);
}
}
धन्यवाद मैन @ हुस्की .. यह मेरे लिए काम कर रहा है :) –