Android デバイスの PlayStore アプリで構成されている Yahoo/Microsoft の電子メール ID/ID を取得することは可能ですか。Yahoo には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;
}