1

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;
        }
4

2 に答える 2

1

アカウントの種類を置き換える

com.yahoo.mobile.client.share.sync

com.yahoo.mobile.client.share.account

于 2014-03-20T05:58:26.860 に答える