i'm trying to do a application to read a web page and show the first line! public class InternetActivity extends Activity{ public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); try{ URL u = new URL("www.google.com.br"); BufferedReader br = new BufferedReader(new InputStreamReader(u.openStream())); TextView view = new TextView(this); String show= br.readLine(); view.setText(show); setContentView(view); br.close();
} catch(Exception ex){ TextView view = new TextView(this); String is= "error"; view.setText(is); setContentView(view); ex.printStackTrace(); } } } anyone could help me ??? For some it isnt work ?? -- 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