private String getGmail() {
String userName = null;
Cursor userCursor = getContentResolver().query(Uri.parse(URL), null,
null, null, null);
if (userCursor.getCount() > 0) {
userCursor.moveToFirst();
userName = userCursor.getString(userCursor.getColumnIndex("name"));
Log.i("QQ", userName);
}
if (userName.equals("mycalendar")) {
userName = "";
}
return userName;
}
直接調方法即可