2011-07-12 11 views
2

現在、AndroidのAccountManagerクラスを使用してユーザーのGmailユーザー名を取得しています。 私のアプリでは、ユーザーが自分のAndroidアカウントに自分のGoogleアカウントを既に追加していることを前提としています。ユーザーが実際に自分のGoogleを拘束していない場合に備えてアカウント&同期設定アプリを起動できるかどうかを尋ねます彼の電話にアカウント?アカウントと同期設定の実行

AccountManager accountManager = AccountManager.get(getApplicationContext()); 
Account[] accounts = accountManager.getAccountsByType("com.google"); 
if (accounts.length == 0) // How? 
    // run Accounts & sync settings so that the user can add his Google account 

答えて

関連する問題