Ошибка Channel is unrecoverably broken and will be disposed! Всегда отлавливается исключение. Permission прописано. Что то не правильно в запросе? Только учусь, но все равно поругайте если что.
/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */ .java.geshi_code {font-family:monospace;} .java.geshi_code .imp {font-weight: bold; color: red;} .java.geshi_code .kw1 {color: #000000; font-weight: bold;} .java.geshi_code .kw2 {color: #000066; font-weight: bold;} .java.geshi_code .kw3 {color: #003399;} .java.geshi_code .kw4 {color: #000066; font-weight: bold;} .java.geshi_code .co1 {color: #666666; font-style: italic;} .java.geshi_code .co2 {color: #006699;} .java.geshi_code .co3 {color: #008000; font-style: italic; font-weight: bold;} .java.geshi_code .coMULTI {color: #666666; font-style: italic;} .java.geshi_code .es0 {color: #000099; font-weight: bold;} .java.geshi_code .br0 {color: #009900;} .java.geshi_code .sy0 {color: #339933;} .java.geshi_code .st0 {color: #0000ff;} .java.geshi_code .nu0 {color: #cc66cc;} .java.geshi_code .me1 {color: #006633;} .java.geshi_code .me2 {color: #006633;} .java.geshi_code span.xtra { display:block; }
public void GetPhrase(View view) {
try{
TextView textView =(TextView)findViewById(R.id.textView);
URL url1 = new URL("http://api.forismatic.com/api/1.0/?method=getQuote&format=text&lang=ru");
HttpURLConnection conn = (HttpURLConnection)url1.openConnection();
textView.setText("Message"+ conn.getResponseMessage());
} catch (Exception e){
TextView textView =(TextView)findViewById(R.id.textView);
e.printStackTrace();
textView.setText("Error");
}
}
try{
TextView textView =(TextView)findViewById(R.id.textView);
URL url1 = new URL("http://api.forismatic.com/api/1.0/?method=getQuote&format=text&lang=ru");
HttpURLConnection conn = (HttpURLConnection)url1.openConnection();
textView.setText("Message"+ conn.getResponseMessage());
} catch (Exception e){
TextView textView =(TextView)findViewById(R.id.textView);
e.printStackTrace();
textView.setText("Error");
}
}