I am trying to add my App into the account manager of android in a Xamarin Droid project, so that user doesn't have to enter the username and password every time.
In my MainActivity, i pass in ApplicationContext object to the App class. Inside the App class i store the reference of ApplicationContext, and then when i call AccountManager.Get (applicationManger).GetAccounts (), it always returns an array of 0 Accounts. When i try to add an Account using
Account acc = new Account ("MyApp", "com.test");
applicationManger.AddAccountExplicitly (acc, "test", new Android.OS.Bundle());
i get the below error
Java.Lang.SecurityException: caller uid 10059 is different than the authenticator's uid
I am trying to understand how to get the authenticator uid to match with my app'uid (10059). I have GET_ACCOUNTS, MANAGE_ACCOUNTS and AUTHENTICATE_ACCOUNTS permissions in the manifest.