2

As I know, an application can make its accountType by adding it in XML file like this:

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

I want to know if one app can have two different accountTypes or not.

HassanUsman
  • 1,787
  • 1
  • 20
  • 38

1 Answers1

0

For one Authenticator, you can't have two different accountType, and also as per docs in your 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;
    }

you should not add additional accounts. So yes only one accountType. If you need another one create another Authenticator.

HassanUsman
  • 1,787
  • 1
  • 20
  • 38
Kartik Shandilya
  • 3,796
  • 5
  • 24
  • 42