Hello,
I am trying to get the nick name used when posting comments and
reviews in the market.  All I konw how to do is get the emails.

AccountManager manager = AccountManager.get(this);
    Account[] accounts = manager.getAccountsByType("com.google");
    List<String> possibleEmails = new LinkedList<String>();

    for (Account account : accounts) {
      // TODO: Check possibleEmail against an email regex or treat
      // account.name as an email address only for certain
account.type values.

          possibleEmails.add(account.name);

    }

    if(!possibleEmails.isEmpty() && possibleEmails.get(0) != null){
        String email = possibleEmails.get(0);
        String[] parts = email.split("@");
        if(parts.length > 0 && parts[0] != null)
            return parts[0];
        else
            return "null";
    }else

        return "null";


}



thanks
http://www.arcdroid.com

-- 
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

Reply via email to