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)