samedi 28 février 2015

Android AccountManager, how to with GCM and FB

I just started to use AccountManager on android.


In my app I have two methods of authentication: email-password and Facebook.


First problem: I have to send to the server during login/signup the Google Cloud Message id, this implies I have eventually to do some async requests and also waiting for user interaction. How can I conciliate this with the method getAuthToken for autologin, which returns a bundle without using callback interfaces?


Second problem: When I login/sign up with Fb, I have to send some data to my server to receive a token. But I'll not have a password to save in the manager creating my account. Is there a "best practices" for this?


Aucun commentaire:

Enregistrer un commentaire