android java url read -


i use 4.4.2 android version. want read url's html code. url has code: echo"1";

i'm trying lot of codes isn't work. pls don't lock topic. error: application stopped.

httpclient don't work.

android: 4.4.2

program: android studio

my androidmanifest.xml:

<uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.access_wifi_state" /> <uses-permission android:name="android.permission.change_network_state"/> 

my java code:

try {     url u = new url("http://www.google.com");     bufferedreader br = null;     br = new bufferedreader(new inputstreamreader(u.openstream()));     br.close(); } catch (ioexception e) {     e.printstacktrace(); } 


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -