Can't get default account in OREO
In Android Oreo, AccountManager.getAccountsByType("com.google"); returns null . Its, working fine in below Android 8 versions. Below is my code: private static Account getAccount(AccountManager accManager) { Account[] accounts = accManager.getAccountsByType("com.google"); Account account; if (accounts.length > 0) { account = accounts[0]; } else { account = null; } return account; } Thanks in advance. As per Android's update, from Oreo onwards we can not use AccountManager.getAccountsByType to get the list of google accounts configured on user's device, as they have updated the Google SignIn