I have the following code that is getting all the gmail id's that are synchronized with my phone but i want the Main gmail id that user register the first time. Because all the other gmail accounts(not main) if i want i can delete anytime but to delete the main account we have to done other things too, So that's why i want to get the main account to use into my application.
here's my code i think to add some filter in it, i can do that but can't able to get the thing correctly.
Account[] accounts=AccountManager.get(this).getAccountsByType("com.google");
for(Account account: accounts)
{
String possibleEmail=account.name;
Log.d("Possible email id's of user", possibleEmail);
}
i already seen Roman link but didn't able to convert it in right manner. I want to use this main email id for push notification using C2DM from google.