I have created sync adapter with default sync account like the following screen shot.

And I would like to update sync account after the user logged in to the application like the following picture.
I googling a lot but I did not found any solution. I am new to sync adapter and I have no idea how to update sync adapter account after user login. Please help.

If you have an Android app that 1) reads and/or writes data from a SQLite database and 2) needs to update that data periodically from another source, say a RESTful web service then one approach you can take is to hook into the Android Sync Service. I recently created an Android project with a Sync Adapter to consume and publish data to a simple Go RESTful web service and I’d like to share what I’ve learned.
Android source: https://github.com/snyderep/TeamKarmaAndroid
Go source: https://github.com/snyderep/TeamKarmaServer
Relevant parts of the Android project: Content Provider Authenticator and Authenticator Service Sync Adapter and Sync Service
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With