我試圖在Android中找到活動的組織者。 日曆查詢是打擊。查找活動組織者 - 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();
我能得到的事件標題,開始日期,結束日期等 不過,主辦單位只返回字符串「組織者」本身。 根據文檔需要獲取組織者的電子郵件ID。 我該如何解決此問題
如果我的回答沒有解釋您所看到的內容,請將代碼放在您要從光標中提取組織者和其他字段的位置。 –