Sorry for this late reply. No unfortunately I haven't found any solution. Regards, J.
2012/6/21 Sandeep Dhameshia <sandeep.dhames...@gmail.com> > am also facing same issue. did you find any solution? > > > On Monday, May 28, 2012 6:44:01 PM UTC+5:30, balteo wrote: >> >> Hello, >> >> The following method systematically throws a IOException when invoked on >> my Android device whereas the internet connection is alive (I can retrieve >> emails or connect to gmail using my Android device). >> >> Can anyone please help? >> >> private void performAuthentication() { >> >> Log.d("GAWidget", "performAuthentication"); >> >> GoogleCredential credential = new GoogleCredential(); >> >> GoogleAccountManager accountManager = new GoogleAccountManager(this); >> >> >> Log.d("GAWidget", "after getting accountManager"); >> >> Account account = accountManager.getAccountByNam**e("bal...@gmail.com"); >> >> >> Log.d("GAWidget", "after getting account"+"account.name: "+account.name); >> >> >> accountManager.getAccountManag**er().getAuthToken(account, >> "oauth2:https://www.**googleapis.com/auth/ >> <https://www.googleapis.com/auth/>**analytics.readonly", >> >> >> true, new AccountManagerCallback<Bundle>**() { >> >> >> public void run(AccountManagerFuture<Bundl**e> future) { >> >> >> try { >> String token = future.getResult(15, >> TimeUnit.SECONDS).getString(Ac**countManager.KEY_AUTHTOKEN); >> >> >> Log.d("GAWidget", "token: "+token); >> >> >> useToken(token); >> } catch (OperationCanceledException e) { >> >> >> Log.e("GAWidget", "OperationCanceledException", e); >> >> >> } catch (AuthenticatorException e) { >> >> Log.e("GAWidget", "AuthenticatorException", e); >> >> >> } catch (IOException e) { >> >> Log.e("GAWidget", "IOException", e); >> >> >> } >> } >> >> }, null); >> } >> >> Stack trace included: >> 05-27 19:09:04.319: E/GAWidget(12487): IOException >> 05-27 19:09:04.319: E/GAWidget(12487): java.io.IOException >> 05-27 19:09:04.319: E/GAWidget(12487): at >> android.accounts.**AccountManager.**convertErrorToException(**AccountManager.java:1440) >> >> 05-27 19:09:04.319: E/GAWidget(12487): at >> android.accounts.**AccountManager.access$400(**AccountManager.java:138) >> 05-27 19:09:04.319: E/GAWidget(12487): at >> android.accounts.**AccountManager$AmsTask$**Response.onError(**AccountManager.java:1301) >> >> 05-27 19:09:04.319: E/GAWidget(12487): at >> android.accounts.**IAccountManagerResponse$Stub.**onTransact(**IAccountManagerResponse.java:**69) >> 05-27 19:09:04.319: E/GAWidget(12487): at >> android.os.Binder.**execTransact(Binder.java:320) >> >> 05-27 19:09:04.319: E/GAWidget(12487): at >> dalvik.system.NativeStart.run(**Native Method) >> >> Regards, >> J. >> >> -- > 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 -- 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