import org.average.whereami.PersistentStore;
import java.io.IOException;
+import com.google.api.client.http.HttpTransport;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
import com.google.api.client.extensions.android2.AndroidHttp;
import com.google.api.client.auth.oauth2.draft10.AccessTokenResponse;
public Oracle(final Resources res, final PersistentStore store) {
authErrorMessage = res.getString(R.string.autherror);
this.store = store;
+ enableLogging();
}
private class MyAccessProtectedResource
}
abstract public String getResult();
+
+ public static void enableLogging() {
+ Logger logger = Logger.getLogger(HttpTransport.class.getName());
+ logger.setLevel(Level.CONFIG);
+ logger.addHandler(new Handler() {
+ @Override
+ public void close() throws SecurityException {}
+ @Override
+ public void flush() {}
+ @Override
+ public void publish(LogRecord record) {
+ Log.v("HttpTransport", record.getMessage());
+ }
+ });
+ }
}