Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Retrieve Image file from parse.com and set on ImageView android

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2.53k
    Comment on it

    It is very easy to retrieve image file from parse.com.

    For example the image file name profilePicture is save on User class and I am going to retrieve the image below.

    ImageView profilePic = (ImageView)findViewById(R.id.image_profile);
      ParseFile imageFile = (ParseFile) currentUser.get("profilePicture");
                FlexLogger.createLog("Image file :: " + imageFile);
                imageFile.getDataInBackground(new GetDataCallback() {
                    @Override
                    public void done(byte[] data, ParseException e) {
                        Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);

    profilePic.setImageBitmap(bitmap); } });

    I got the image by doing this. Hope it will help you.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: