gpt4 book ai didi

android - 如何获取 Yahoo/Microsoft 帐户的电子邮件 ID

转载 作者:行者123 更新时间:2023-11-29 21:11:58 24 4
gpt4 key购买 nike

是否可以获取在 Android 设备中使用 PlayStore 应用程序配置的 Yahoo/Microsoft 电子邮件 ID/ID。我为雅虎使用 com.yahoo.mobile.client.share.sync。但是不工作。我可以知道什么是实现我的目标的正确方法吗?

这是我的代码:

public String[] allemails()
{

_accountMgr = AccountManager.get(getActivity());
// Account [] accounts = _accountMgr.getAccounts();

// Account [] accounts = _accountMgr.getAccountsByType(GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);
Account [] accounts = _accountMgr.getAccountsByType("com.yahoo.mobile.client.share.sync");

numberOfEmail = accounts.length ;
String [] emailAddress = new String[numberOfEmail];

r = 0;
for (Account account : accounts) {
accountsList = account.name.toString();
emailAddress[r] = accountsList;
r += 1;

}

MyAlertDialog f = new MyAlertDialog();
Bundle args = new Bundle();
args.putStringArray("Title", emailAddress);
f.setArguments(args);

return emailAddress;
}

最佳答案

替换账户类型

com.yahoo.mobile.cllient.share.sync

com.yahoo.mobile.client.share.account

关于android - 如何获取 Yahoo/Microsoft 帐户的电子邮件 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22481360/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com