What is the value of 'url'? The code complains that the value of 'url' is not formed correctly, that it isn't a proper URL.
On May 13, 9:42 am, jaimin mehta <[email protected]> wrote: > Hi. > > I have some question regarding image downloading from the server. > > In my application i had to continually call one method in which image > download code is placed > > But java.net.MalformedURLException is there when i call image download > method continually > > so any suggestion why i get java.net.MalformedURLException in my > code. > > try > { > URL aURL = new URL(url); > URLConnection conn = aURL.openConnection(); > conn.connect(); > InputStream is = conn.getInputStream(); > BufferedInputStream bis = new BufferedInputStream(is); > int i = bis.available(); > if(i!=0) > { > bm = BitmapFactory.decodeStream(bis); > setOriginalImage(bm); > bm = resizeBitmap(bm, 30, 30); > } > /* bm = BitmapFactory.decodeStream(bis); > setOriginalImage(bm); > bm = resizeBitmap(bm, 30, 30);*/ > bis.close(); > is.close(); > } > catch (IOException e) > { > Log.e("TAG", "Error getting bitmap", e); > } > catch(Exception e) > { > e.printStackTrace(); > } > > retrun bm; > > here is my code > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

