I have read a lot of tutorials on Sync Adapter such as the tutorial on http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1 as well as the SampleSyncAdapter sample code on Android Developer website.
But I don’t understand that how the server side handles the Authentication and synchronization queries. Is it possible for me to use php to query from a mySQL server database?
I have read a lot of tutorials on Sync Adapter such as the tutorial
Share
The piece you’re missing is not part of a Sync Adapter. It’s the
AbstractAccountAuthenticator. It’s the class that actually deals with the user’s password, and passing it to the server, and it will need to be written in a manner that’s well paired with the server in question.How:
First off, how does the process work?
So this token is limited use — After a while, the server will refuse to accept it. At that point, the SyncAdapter tries to use the token and gets an authentication error. So then what?
Why?
So there are several advantages.
Expiration:
Tokens are kind of dangerous. Anyone who gets access to the token can login as you. So, good practices here:
a web interface logs out. There isn’t really a ‘logout’ concept for tokens.