特定の日付に基づいて私のカレンダーからイベントをリストしたいと思います。私は以下を使用していますAndroidでカレンダーイベントを日付で取得しますか?
Cursor cursor = getContentResolver().query(Uri.parse("content://com.android.calendar/events"), new String[]{ "_id", "title", "description", "dtstart", "dtend", "eventLocation" }, null, null, null);
このコードは正常に動作しますが、カレンダーからの合計イベントが発生します。しかし、私は2011年8月15日のような特定の日にイベントが必要です。私は、次のコード
Cursor cursor = getContentResolver().query(Uri.parse("content://com.android.calendar/events"), new String[]{ "_id", "title", "description", "dtstart", "dtend", "eventLocation" }, "dtstart", new String[]{sdf.format(calender.getTime())}, null);
cursor.moveToFirst();
を試みたが、私は例外
によって引き起こさ取得しています:android.database.sqlite.SQLiteException:いいえ、そのようなコラム: Calendars.dtstartを:、コンパイル中:_idを選択して、タイトルを(1)AND (Calendars.dtstart)
私の問題を解決するためにいくつかのアドバイスを与えてくださいview_events FROM、説明、 DTSTART、DTEND、eventLocation
GoogleカレンダーGData APIを使用してユーザーのGoogleカレンダーにアクセスしてください。 – CommonsWare