There is an emial application in android that allows to add email account. How can I add a gmail account in that application programmatically?
I used this link Add account automatically but got SecurityException "caller uid 10040 is different than the authenticator's uid".
I used that code with
Account account = new Account("my id@gmail.com", "com.example.addaccount.account");
Where "com.example.addaccount.account" is package name of my application, and I added authenticator.xml file in a folder named xml, with same package name android:accountType="com.example.addaccount.account".
But I am getting error "caller uid 10043 is different than the authenticator's uid". Can any one please tell me, what am I missing? I just added the xml file and wrote that code to add account, do I need to refer to that xml somehow?