2

据我所知,应用程序可以accountType通过将其添加到这样的XML文件中来实现:

android:accountType="com.android.app.test"

我想知道一个应用程序是否可以两个不同的应用程序。accountTypes

4

1 回答 1

0

对于一个Authenticator,您不能有两个不同accountType的,并且根据您的文档中的Authenticator class

   // Don't add additional accounts
    @Override
    public Bundle addAccount(
            AccountAuthenticatorResponse r,
            String s,
            String s2,
            String[] strings,
            Bundle bundle) throws NetworkErrorException {
        return null;
    }

您不应添加其他帐户。所以的,只有一个accountType。如果您需要另一个创建另一个Authenticator.

于 2017-10-23T04:25:12.230 回答