I am implementing authentication with google accounts using
accountmanager:

AccountManagerFuture<Bundle> amf = mgr.getAuthToken(account, "ah",
null, activity, null, null);
try {
    amf.getResult();
} catch (OperationCanceledException e) {
   handle();
} catch (AuthenticatorException e) {
   handle();
} catch (IOException e) {
   handle();
}
This code is inside a thread. It works as expected. The user selects
an account (this of course is not part of this code) and the system
calls this code with that account. If the user already gave
authorization it just returns the token in amf bundle. If the user
hasn't given authorization yet, accountmanager opens an activity where
the user should give his permission to use his account with my app.
The user can accept or deny. Accepting a token is retrieved in the
bundle and denying an exception is raised that can be handled.

The issue comes if the user being in the activity where he is asked if
gives or not authorization leaves the activity (pressing home for
example). There is no exception being thrown and actually the thread
gets stuck in getResult().

Has anybody handled this before?

Thanks for your help!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to