0
我有一個應用程序,在Android 4.x中查詢谷歌日曆實例和事件API。我已經在各種設備上進行了測試,它的工作原理,但由於某種原因,它不適用於HTC Sense 3.6(Android 4.0.3)。任何人都可以證實這一點,或者是否有人知道發生了什麼?HTC Sense 3.6不顯示日曆事件?
下面的代碼片段,在非的HTC Sense設備的工作原理:
Cursor instances = Instances.query(
context.getContentResolver(),
new String[]{Instances.EVENT_ID, Instances.BEGIN, Instances.END, Instances.SELF_ATTENDEE_STATUS},
startTime,
startTime+lengthInMillis);
.
.
.
long eventId = instances.getLong(instances.getColumnIndex(Instances.EVENT_ID));
Cursor events = context.getContentResolver().query(
ContentUris.withAppendedId(Events.CONTENT_URI, eventId),
new String[] {Events._ID, Events.CALENDAR_ID, Events.TITLE, Events.DESCRIPTION, Events.EVENT_LOCATION, Events.ALL_DAY, Events.AVAILABILITY},
null,
null,
null);