I am trying to create an account in Accounts & Sync which doesn't require authentication. I have already referred to SampleSync example. The key difference between the example and what I am trying to build is Authentication. I don't want to display an Authentication/Login activity to the user. Is it possible to create an account directly from Authenticator service without having an 开发者_运维技巧Authentication activity?
The AccountAuthenticatorActivity
activity is completely optional. If the Authenticator can authenticate without it (like in the case of anonymous access) there is no need for any activities to be available. Your SyncAdapter can even be coded not to get any account info, as there isn't any needed.
In your Authenticator you may however make it impossible to create more than one account, just for clarity sake.
精彩评论