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 user data of specified account * @param context context * @param account account * @param key key * @return user data string */ public static String getUserData(Context context, Account account, String key) { if (account == null) return null; AccountManager accountManager = AccountManager.get(context); return accountManager.getUserData(account, key); } }