Hi, Any ideas here??
I would really appreciate if someone look into this. Thanks and Regards, Vaibhav Gathibandhe On Thu, Apr 16, 2009 at 12:56 AM, Vaibhav Gathibandhe < vaibhav.andr...@gmail.com> wrote: > Hi, > > Yes, that's true. Here is the code snippet: > > HttpHost host = new HttpHost("http://10.0.2.2/Nrti/recommendation_saver"); > HttpRequest request = new HttpPost(); > . > . > Setting HttpParams here > . > > request.setParams(params); > HttpResponse response = client.execute(host, request); > > And as I mentioned, the same URL works with the emulator's browser and > browser on my laptop (if I use http://*localhost* > /Nrti/recommendation_saver). > > So, the question is why the URL is not getting resolved from the code!! > > Thanks and Regards, > Vaibhav Gathibandhe > > > On Thu, Apr 16, 2009 at 12:31 AM, Desu Vinod Kumar > <vinny.s...@gmail.com>wrote: > >> Actually why these exception gets is if the I-net address .?method >> getbyname and getlocalhost are unable to resolve the host name then they >> throws an unknownhostexception >> >> >> >> >> On Thu, Apr 16, 2009 at 9:46 AM, Vaibhav Gathibandhe < >> vaibhav.andr...@gmail.com> wrote: >> >>> >>> Hi all, >>> >>> I am getting UnknownHostException - host is unresolved in my app when >>> trying to connect the emulator to server on my laptop(running on >>> localhost). >>> >>> The URL I am using is: >>> >>> HttpHost host = new HttpHost("http://10.0.2.2/Nrti/ >>> recommendation_saver"); >>> >>> I have android.permission.INTERNET permission set in my >>> AndroidMenifest.xml. Moreover, with this URL, I am able to connect to >>> my machine's server when I use the browser on the emulator. >>> >>> Has anyone faced and solved such problem. If yes, I would really like >>> to know the solution. >>> >>> Thanks in advance. >>> >>> Regards, >>> Vaibhav Gathibandhe >>> >>> >>> >>> >> >> >> -- >> Regards >> ------------------- >> Desu Vinod Kumar >> vinny.s...@gmail.com >> 09916009493 >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---