This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Bitmap getBitmapFromURL(String src) { | |
try { | |
java.net.URL url = new java.net.URL(src); | |
HttpURLConnection connection = (HttpURLConnection) url | |
.openConnection(); | |
connection.setDoInput(true); | |
connection.connect(); | |
InputStream input = connection.getInputStream(); | |
Bitmap myBitmap = BitmapFactory.decodeStream(input); | |
return myBitmap; |