I’m learning Android development. I have a basic app running on the Gingerbread emulator, which works fine. I own a Galaxy Nexus and would like to test my app on it.
I set up a new project in Eclipse using the 4.03 SDK and emulator. But when it tries to get an XML file using the SAX parser from a URL, I get an error “java.io.IOException: Couldn’t open http://myurl.com“
Is there a difference I’m missing between Gingerbread and ICS regarding URL download? And yes, I have the internet permission enabled.
Thanks.
Turns out Android 3.0 and higher does not allow opening URLs in the main thread. I used AsyncTask to open the URL in a separate thread.