Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void checkEventsInCal() {
- ContentResolver cr = getContentResolver();
- Cursor cursor = cr.query(Uri.parse("content://com.android.calendar/events"), new String[]{"_id"}, "_id=?", new String[]{CalendarContract.Events.TITLE}, null);
- if (cursor.moveToFirst()) {
- Toast.makeText(this,"Event Exists!", Toast.LENGTH_SHORT).show();
- }else {
- Toast.makeText(this,"Event Doesn't Exist!", Toast.LENGTH_SHORT).show();
- }
- }
Add Comment
Please, Sign In to add comment