ensure that <uses-permission> is inside <manifest>, too, not inside <application>.
i've had problems using URLConnection directly - with short transfers i could reproducibly get "SOCKETLOG add_recv_stats 0" log error messages, accompanied by nothing being delivered to the Android app. i switched to using Socket or HttpClient, and everything worked fine. URLConnection should work though IMHO. >Make sure you have the "android.permission.INTERNET" Uses Permission >in your AndroidManifest.xml file to enable your app to access the >internet. > >I don't know of any preference between HttpClient and URLConnection >(I'd also be happy to know if one of them is preferred). > >There's an apps-for-android project which contains app samples created >by Google's Android team. I haven't examined them in-depth, but I'm >sure they have some pretty good usage examples. From just a quick >browse, this class might be a useful reference for you: > >http://code.google.com/p/apps-for-android/source/browse/trunk/Translate/src/com/beust/android/translate/Translate.java > >Good Luck, >Amos > >On Oct 9, 12:54 pm, Jasp182 <[EMAIL PROTECTED]> wrote: >> I have tried to call out to the web using both HttpClient and >> URLConnection, and I get "unknown error" in both cases at the point >> the call is actually made (HttpClient.execute() or >> URLConnection.getContent() methods). My emulator is able to connect >> to the web, because I can use the Browser with no problem. So, I'm >> assuming that there aren't any issues with my settings (this is being >> done on my home network with no proxy server). Is there a "best >> practices" preference between using HttpClient or URLConnection, and >> are there any examples or sample apps (with source code) that make >> simple calls to the web? > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---