Android获取Gmail邮箱地址方法
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;
}
直接调方法即可
补充:移动开发 , Android ,