android - Getting invalid Authtoken for gmail login? -


in android application have created gmail login.the user can login gmail credentials in phone.the problem not getting valid token in android gingerbread os.but in case of ics , jelly bean, getting correct token. have tested in 5 devices.

for checking validity of token used link

finally solved it.the problem token not getting updated. when ever accessing token using getauthtoken

    string authtoken=accountmanager.getauthtoken(account, scope, false,                 new ontokenacquired(), null); 

the authtoken should validated using

accountmanager.invalidateauthtoken("com.google",                     bundle.getstring(accountmanager.key_authtoken)); 

then again after should call

string authtokennew=accountmanager.getauthtoken(account, scope, false, new ontokenacquired(), null);

this valied token. can check validity of token link


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -