title: Get Email Id of device which is configured with PlayStore
body: <p>Is it possible to get email id/ ids which are configured with PlayStore app in android device. </p>
  
  <pre><code>Pattern emailPattern = Patterns.EMAIL_ADDRESS; 
                  Account[] accounts = AccountManager.get(getActivity()).getAccounts();
                  for (Account account : accounts) {
                      if (emailPattern.matcher(account.name).matches()) {
                          primaryEmailID = account.name;
  
                      }
                  }
  </code></pre>
  
  <p>By using this code I get all sets of email ids configured in device i.e, gmail, yahoo, etc.
  But how can I get email ids of only gmail account(I guess email ids in gmail account gets configured in playstore).</p>