Hi! I'm trying to get the current temperature via google weather with SAX
Parser but i get a "permision denied" exeption message when i try to get
data:

Code:

/* Get what user typed to the EditText. */
String cityParamString = ((EditText)
findViewById(R.id.edit_input)).getText().toString();
String queryString = "http://www.google.com/ig/api?weather="+
cityParamString;
 /* Replace blanks with HTML-Equivalent. */
 url = new URL(queryString.replace(" ", "%20"));
 /* Get a SAXParser from the SAXPArserFactory. */
 SAXParserFactory spf = SAXParserFactory.newInstance();
 SAXParser sp = spf.newSAXParser();
  /* Get the XMLReader of the SAXParser we created. */
  XMLReader xr = sp.getXMLReader();
 /* Create a new ContentHandler and apply it to the XML-Reader */
  GoogleWeatherHandler gwh = new GoogleWeatherHandler();
 xr.setContentHandler(gwh);
 /* Parse the xml-data our URL-call returned. */
 xr.parse(new InputSource(url.openStream())); <---- THIS CRASHES WITH
PERMISION DENIED EXCEPTION MESSAGE

The url seems to be find, but url.openstream dosn't work

Any Idea?

Thanks in advance

*Ferran*

-- 
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

Reply via email to