[android-beginners] HttpClient through wifi OK, through 3G KO
Hi, I have got a servlet that returns Hello World on each POST : { resp.setCharacterEncoding(utf-8); resp.setContentType(text/plain); PrintWriter out = resp.getWriter(); out.append(Hello World); out.flush(); out.close(); } I have got an HTML page that queries this servlet through an XMLHttpRequest. Both are deployed on a tomcat reachable on the internet. I have got my android app that uses HttpClient to reach my servlet deployed on my Tomcat. It is installed on my HTC Magic. If I launch it when connected on Wifi : it works. If I launch it when connected to 3G (GSM data network) : it doesn't work but my servlet is reached. Technical problem while receiving response. org.apache.http.NoHttpResponseException: The target server failed to respond at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:85) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:174) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:179) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:235) at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:259) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:279) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:410) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465) If I use the web browser through 3G to activate my HTML page, I do see the Hello World. How could I debug HttpClient or ask it to dump everything ? Does someone have a clue on what's going on ? Thanks a lot, -- Hubert -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Low performance using SurfaceView, touchMode and OptionMenu
Hi, I'm recently working on android application and i can not deal with performance issues. My app is based on SurfaceView, I use separate thread like in lunar lander. My problems starts when i use onTouchEvent and onCreateOptionMenu. I created a test application, which does nothing other drawing FPS on canvas. It shows up to 60 fps, some times 40-50 when i don't interact in it. Another case - i start the same application, i have about 60 fps. Then I open option menu and it slow down to 40 fps, i touch the screen and another drop to about 20 fps. If i stop touch the screen fps increase to about 40 some times 50 but not to 60. Sometimesi have the case that app runs with 60 fps, i start option menu and touch the scren and I have 60 fps as on beginning. I have no ideas why is this happens. If anyone has any idea, please reply. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Cannot enable gears in emulator
Hi all, I am using SDK 1.0_r2 and cannot use google gears in my applications. For example, gears API examples fail to work saying that page is not allowed to use Gears. I Found settings for this in browser settings, but clicking on Gears settings does nothing (I cannot see list of allowed application!). Any ideas? Thanks, Hubert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---