this may be more like a java question

I just want to display an image placed on server onto my imageView

The following is the code which m using :--


        ImageView iv;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        iv=(ImageView)findViewById(R.id.iv);
        String stringURL = "https://graph.facebook.com/618306968/
picture?access_token" +
                "=103931556876|6ad1235e03c6472b20430aad-618306968|
cDUe563_MNfHUeUiTpqqh8mB0o8";

        InputStream is = null;
        BufferedInputStream bis = null;
        Bitmap bmp = null;

         try {
             URL url = new URL(stringURL);
             URLConnection conn = url.openConnection();
             conn.connect();
             is = conn.getInputStream();
             bis = new BufferedInputStream(is);
             bmp = BitmapFactory.decodeStream(bis);

              } catch (MalformedURLException e) {

                } catch (IOException e) {

                  }catch (Exception e) {

                     } finally {
    try {
        if( is != null )
            is.close();
        if( bis != null )
            bis.close();
    } catch (IOException e) {

    }
}
iv.setImageBitmap(bmp);

    }


I am not getting any error but also my imageview is empty and is not
showing anything

-- 
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

Reply via email to