about 9 years ago
Blow code get list of Emails account from AccountManager.
AccountManager manager = (AccountManager) mActivity.getSystemService(mActivity.ACCOUNT_SERVICE); Account[] list = manager.getAccounts(); if (list.length > 0) { HashSet<String> emails = new HashSet<>(); for (int i = 0; i < list.length; i++) { if (isValidEmail(list[i].name)) { emails.add(list[i].name); } } } public static boolean isValidEmail(String email) { return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches(); }
Permission Required:-
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
Happy Coding ;)
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)