Not getting Local/Device contact name and type using AccountManager android -
/** * account available in phone , add list */ private void getallaccounts() { int counter = 0; final accountmanager accmanager = accountmanager .get(activity.this); final account accounts[] = accmanager.getaccounts(); (int = 0; < accounts.length; i++) { log.i(tag, "name " + accounts[i].name + ", type " + accounts[i].type); } }
i using above code getting available accounts of device. works on sony device not in samsung, micromax, htc. don't know reason behind this. if has idea please kindly me.
i not able local/phone/device contact name , type samsung, htc, micromax.
do
private string[] getaccountnames() { maccountmanager = accountmanager.get(this); account[] accounts = maccountmanager.getaccountsbytype( googleauthutil.google_account_type); string[] names = new string[accounts.length]; (int = 0; < names.length; i++) { names[i] = accounts[i].name; } return names; }
for more visit
Comments
Post a Comment