Parse Image Retrieval


Anyone has a working code using the latest APIs to retrieve images and display them using an Array List and RecyclerView. I am able to upload the images and can retrieve one at a time but not all in an array and then display them using the Recycler view.

Any help much appreciated.


Would you mind to share what you’ve tried so far? Maybe it will be easier for someone to help.

Here is the code. The class is called ImageUpload and inside there is the image with its description and Username. How can put ImageFile+Description+Username in Array called allPostsList.

    ParseQuery<ParseObject> query  = new ParseQuery("ImageUpload");

    //Sort query by Ascending order as per created date

    query.findInBackground(new FindCallback<ParseObject>() {
        public void done(List<ParseObject> objects, ParseException e) {

            if(objects.size() >0 && e == null){

                for(ParseObject object: objects){

                    ParseFile file = (ParseFile) object.get("ImageFile");

                    file.getDataInBackground(new GetDataCallback() {

                        public void done(byte[] data, ParseException e) {

                            if(e == null && data != null){

                                Bitmap bitmap = BitmapFactory.decodeByteArray(data,0,data.length);

                                //Post post = new Post();
                                //Post post = objects.get(bmpList, allPostsList);

                                //ImageView imageView = new ImageView(getContext());
                                //ArrayList<Bitmap> bitmapArray = new ArrayList<Bitmap>();


                                //String currentUser = ParseUser.getCurrentUser().getUsername();
                                //Post spost = new Post(currentUser);




There is specialized image loading library for android. Its called Glide.