画像のパスからビットマップ画像を取得しようとしました。しかし、値をBitmapFactory.decodeStream
返しnull
ます。
コード:
URL url = new URL(path);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
Bitmap myBitmap = BitmapFactory.decodeStream(input);
connection.disconnect();
input.close();
もっと多くのサイトを検索しましたが、それでも解決策が得られませんでした。