Java tutorial
//package com.java2s; //License from project: Apache License import android.accounts.Account; import android.accounts.AccountManager; import android.content.Context; public class Main { /** * Get password of specified account * @param context context * @param account account * @return account password */ public static String getAccountPassword(Context context, Account account) { if (account == null) return null; AccountManager accountManager = AccountManager.get(context); return accountManager.getPassword(account); } }