AndroidManifest.xml

<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCOUNT_MANAGER" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />

ReadGooleAccount.java
AccountManager mgr = AccountManager.get(this);
Account[] accts = mgr.getAccounts();
final int count = accts.length;
Account acct = null;

for(int i=0;i<count;i++) {
acct = accts[i];
Logger.d("ANDROES", "Account - name="+acct.name+", type="+acct.type);
}

관련사이트)
http://blog.naver.com/cwj3688?Redirect=Log&logNo=20121677208
http://blog.naver.com/cwj3688?Redirect=Log&logNo=20123259451
2011/12/06 11:34 2011/12/06 11:34

Trackback Address :: 이 글에는 트랙백을 보낼 수 없습니다