I need a way to keep data updated on my app. I read about SyncAdapter and saw that it requires an AbstractAccountAuthenticator, but my app doesn’t require the user to fill any user/password information. How can I deal with this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If your problem is the sync of the contacts in the native address book and you do not have an authenticator and a user registered with that account-type the contacts that you create will not be shown.
What I did was to create a stub authenticator.
Try this:
example of stub authenticator
Consider that the real problem with SyncAdapter is that it is not active if there is no internet connection. The reason is that the sync adapers are thought to be used to synch your local data with a backend server and so if you do not have internet connection you can’t sync and the framework disable the SyncAdapter.
What I did was to create my own component for synchronizing the contacts.