1
我一直在试图让我的安装装置,此代码对谷歌日历的ID:获取日历标识
String[] projection =
new String[]{
Calendars._ID,
Calendars.NAME,
Calendars.ACCOUNT_NAME,
Calendars.ACCOUNT_TYPE};
Cursor calCursor =
getContentResolver().
query(Calendars.CONTENT_URI,
projection,
Calendars.VISIBLE + " = 1 ",
null,
Calendars._ID + " ASC");
if (calCursor.moveToFirst()) {
do {
long id = calCursor.getLong(0);
String displayName = calCursor.getString(1);
// ...
textView1.setText(displayName + id); //outputs display name and id
} while (calCursor.moveToNext());
但它只是返回三星日历的名称和ID。 任何人都可以向我解释为什么?谢谢。