Hello, this is my first time posting, but I've run into a massive wall in 
my progress.

A quick background, I started developing an app for the Android about 3-4 
months ago, off and on. It is a project I received from my college teacher 
for a sort of internship. 
I have to take a peice of text, inputted by the user, attach it to the a 
url address, and then access the website, retrieve the xml, parse it, and 
then display 3 peices of the code in separate textviews.
Currently, I've separated the "text input" screen from the screen which 
displays the parsed data sections.

However, I'm currently completely stuck trying to access the website and 
retrieve the xml. 
The debug simply says "Source not found." and gives me an option to Edit 
Source Lookup Path. However, I've got the program already directed to the 
Source location.
Currently, this is my code for attempting to access the website :

public class Price_PageActivity extends Activity { 
>
> public void onCreate(Bundle savedInstanceState) { 
> super.onCreate(savedInstanceState);
> setContentView(R.layout.price_page);
>
> HttpURLConnection con = null;
> URL url1;
> InputStream is=null;
> Intent intent = getIntent(); 
> String urlextra = intent.getStringExtra("android.grabber.string"); 
> try {
> url1 = new URL(("http://www.reuters.com/finance/stocks/overview?symbol="; + 
> urlextra ));
> con = (HttpURLConnection) url1.openConnection();
> // con.setReadTimeout(10000 /* milliseconds */);
> // con.setConnectTimeout(15000 /* milliseconds */);
> con.setRequestMethod("GET");
> con.setDoInput(true);
> con.connect();
> is = con.getInputStream();
>
>
>
> BufferedReader rd = new BufferedReader(new InputStreamReader(is), 4096);
> String line;
> StringBuilder sb = new StringBuilder();
> while ((line = rd.readLine()) != null) {
> sb.append(line);
> }
> rd.close();
> String streamcontent = sb.toString();
> TextView Text = (TextView) findViewById(R.id.TextView02);
> Text.setText(streamcontent);
> } catch (IOException e) {
> //handle the exception !
> e.printStackTrace(); }



If any more information is required, I will try my best to provide it.
Any help I can gather with this problem would be greatly appreciated, as 
I've been stuck on this for a disappointingly long time now...

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