I'm having problems trying to support limited profiles in android 4.3+. I installed the authenticator:
<service
android:name=".account.AuthenticatorService"
android:permission="com.example.MANAGE_ACCOUNTS">
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator"/>
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/authenticator" />
</service>
And in the authenticator.xml file:
<account-authenticator
xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="com.example"
android:icon="@drawable/ic_launcher"
android:smallIcon="@drawable/ic_launcher"
android:label="@string/label"
/>
I get a list of available accounts and print their types:
AccountManager am = AccountManager.get(this);
accounts = am.getAccounts();
for (Account account : Accounts) {
Log.d(TAG, account.type);
}
And get all my google accounts, github account, Dropbox account and my account "com.example" when I launch the application during login as the main user. Then I try it with a limited account.
First I add in AndroidManifest:
<application
.
.
.
android:restrictedAccountType="com.example">
and when I run the application at login as a limited user, I get nothing. There are no accounts in the list. If I change restrictedAccountTypeto com.google, I will get a list of all my google accounts.
, , "" ... - , , ? ...