开发者

Check if any email account setup in android

开发者 https://www.devze.com 2023-03-16 08:05 出处:网络
How can I check in android if any email account i开发者_高级运维s set up?You can use the AccountManager for checking the google accounts on an android phone :

How can I check in android if any email account i开发者_高级运维s set up?


You can use the AccountManager for checking the google accounts on an android phone :

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

    for (Account account : accounts) {
    //do something with account
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消