You might want to take a tcpdump to check what traffic you receive on the 3g interface.
-- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Oct 14, 1:30 am, truthtrap <[email protected]> wrote: > guys and girls, > > i am trying to test the availability of a service with a socket. the > code is quite simple > try { > InetAddress address = InetAddress.getByName(dns); > s = new Socket(); > try { > SocketAddress endpoint = new > InetSocketAddress(address, port); > s.connect(endpoint, 1000); > s.close(); > > return true; > } catch (IOException e) { > return false; > } > } catch (UnknownHostException e) { > return false; > } > > it works in the emulator and i thought everything was ok. but it does > not work on my device (ADP with 1.6.) actually it does work, but not > with 3G. > > the socket.connect blocks when the device is in wifi mode, as > expected. but when on 3G it just continues, as if a connection has > been made. > > (the tested case is port 80 on an amazon ec2 instance.) > > can anyone either tell me why this happens so i can fix. or perhaps > there is an alternative to testing service connections for > availability. > > thanks, > jurg. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

