Hello,
I am trying to understand what the getResult method of AccountManagerFuture
does.
I am working trying to authenticate in a development environment with GAE
and my android phone.
When getResult is called and I my android phone is offline I get a
IOException.
03-19 13:58:03.933: W/System.err(1801): java.io.IOException
03-19 13:58:03.933: W/System.err(1801): at
android.accounts.AccountManager.convertErrorToException(AccountManager.java:1419)
03-19 13:58:03.933: W/System.err(1801): at
android.accounts.AccountManager.access$400(AccountManager.java:134)
03-19 13:58:03.933: W/System.err(1801): at
android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1280)
03-19 13:58:03.933: W/System.err(1801): at
android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69)
03-19 13:58:03.933: W/System.err(1801): at
android.os.Binder.execTransact(Binder.java:288)
03-19 13:58:03.933: W/System.err(1801): at
dalvik.system.NativeStart.run(Native Method)
If it is online I can get an authorization token.
But I would like to operate completely off the Internet while I am
developing. Is this possible? Sorry if it is banal, but could you tell me
what getResult does or if it
gets the token from a Google server on the Internet?
private String getAuthToken(AccountManagerFutureBundle future) {
try {
Bundle authTokenBundle = future.getResult();
String authToken =
authTokenBundle.get(AccountManager.KEY_AUTHTOKEN).toString();
return authToken;
} catch (Exception e) {
return null;
}
}
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en