Android でイベントの主催者を見つけようとしました。カレンダー クエリを指定します。
String[] projection = new String[] { "calendar_id", "title", "description",
"dtstart", "dtend","organizer", "eventLocation","hasAttendeeData","_id"};
String selection = "(\" + CalendarContract.Events.CALENDAR_ID + \" = ?) OR ((dtstart >= "+cal_Start.getTimeInMillis()+") AND (dtend <= "+cal_End.getTimeInMillis()+"))";
String[] selectionArgs = new String[] { String.valueOf(1)};
Cursor cursor = context.getContentResolver()
.query(
Uri.parse("content://com.android.calendar/events"),projection
, selection,
selectionArgs, null);
cursor.moveToFirst();
イベントのタイトル、開始日、終了日などを取得できますが、主催者は文字列「organizer」自体を返すだけです。ドキュメントに従って、主催者の電子メール ID を取得する必要があります。この問題を解決するにはどうすればよいですか