Dear,I employed "Google API Client Library for Java, version 1.12.0-beta" andmove sample code in OAuth2Sample.java to my own XXX.apk. When this APK runs,it would fail at the following function:com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp.authorize()The system logging message follows.W/System.err( 2219): java.lang.NoClassDefFoundError: org.mortbay.jetty.ServerW/System.err( 2219): at com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver.getRedirectUri (LocalServerReceiver.java:98)W/System.err( 2219): at com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp.authorize(AuthorizationCodeInstalledApp.java:76)Any suggestions might help ...
Dear Inbar:Thanks for your help. I used the code segment in "Calendar Sample"; the APK functions correctly.Access token for user could be retrieved correctly. Thanks sincerely!Nevertheless I got stuck in another problem:"Access token would expire almost an hour (60 minites) later; and I calledaccountManager.invalidateAuthToken(authToken);// ... (get access token once again here)... ... ...But I still get "the expired token"
Would you please provide me clues to refresh token thru Google's API ?In addition, I do not provide client ID, client secrets in my own ***.APKBut Google account server still grant such a request and give my program "access token"It's a mystery to me !? (Only client_secrets.json file appear in the APK source folder)Appreciate your help.