I suppose it's probably helpful to mention that I have the "GET_ACCOUNTS" permission specified in the manifest.
Thanks! On Mar 2, 3:22 pm, Peter <[email protected]> wrote: > Hi all, > > I currently have an app I'm beta testing and one of the test users has > an Archos 101 tablet. I'm implementing an in-app store and one of the > things I need is the account name they're using. I have logic to > handle if they've got multiple accounts, but I seem to be getting only > a null result from this code: > > public String[] getAccountList(Activity activity) { > int numAccounts= 0; > AccountManager accountManager = > AccountManager.get(activity); > Account[] accounts = > accountManager.getAccountsByType("com.google"); > numAccounts= accounts.length; > if (numAccounts< 1) { > return null; > } > String[] accountList = new String[numAccounts]; > int i = 0; > for (Account account : accounts) { > accountList[i] = account.name; > i++; > } > return accountList; > } > > The accountManager.getAccountsByType() method keeps returning no > results (same goes for getAccounts), so it just returns null. Is there > a step I'm missing to allow my app to get account information on 2.2.x > devices? The code works fine on a Toshiba Thrive (AT100) and the in- > app store functions as I expect. > > Thanks! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

