How to get first and last name in android?

How to get username, last name, email id from email accounts or whatsapp accounts or any accounts?

I have tried this code

AccountManager am = AccountManager.get(context);
     Account[] accounts = am.getAccounts();

      

but in this code only account type and account name appears.

I need a name and a recent account with an email id.

Help me. How can you?

Thanks and regards,

Nitin

+3


source to share





All Articles