Androidプログラミング質問スレ Part8
■ このスレッドは過去ログ倉庫に格納されています
0516デフォルトの名無しさん
2011/05/25(水) 14:00:46.15connection = (HttpURLConnection) url.openConnection();
connection.setConnectTimeout(Main.BANNER_TIMEOUT);
connection.setReadTimeout(Main.SO_TIMEOUT);
connection.setRequestMethod("GET");
connection.connect();
if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {
InputStream in = connection.getInputStream();
drawable = Drawable.createFromStream(in, source);
in.close();
}
Log.v(TAG, "code:"+connection.getResponseCode());
このコードで レスポンスコードが200なのに、
drawableがnullの時があります。
原因としてはどのへんが怪しいでしょうか?
■ このスレッドは過去ログ倉庫に格納されています