title: Android: Retrieving User profile picture from User class in Parse
body: <p>I want to get the current user followers in a list-view inducing their names and profile pictures, I have two classes in parse :
  User class: includes ( username and pic columns )
  and following class: includes ( username and follower_name columns )</p>
  
  <p>now here my query :</p>
  
  <pre><code>@Override
  protected Void doInBackground(Void... params) {
  // Create the array
  users = new ArrayList&lt;UserInfo&gt;();
  try {
        ParseUser currentuser = ParseUser.getCurrentUser();
        ParseQuery&lt;ParseObject&gt; innerQuery = new ParseQuery&lt;ParseObject&gt;("following");
        innerQuery.whereEqualTo("username", currentuser);
        ParseQuery&lt;ParseUser&gt; query = ParseUser.getQuery();
        query.whereMatchesQuery("username", innerQuery);
        // by ascending
        query.orderByAscending("createdAt");
        ob = query.find();
        for (ParseObject user : ob) {
        // Locate images in pic column
        ParseFile image = (ParseFile) user.get("pic");
  
        UserInfo map = new UserInfo();
        map.setUserName((String) user.get("follower_name"));
        map.setPic(image.getUrl());
        users.add(map);
  
      }
      } catch (ParseException e) {
      Log.e("Error", e.getMessage());
      e.printStackTrace();
      }
      return null;
   }
  </code></pre>
  
  <p>I'm a new parser and trying to learn their queries </p>
  
  <p>Update :</p>
  
  <p>I change the query to be like this:</p>
  
  <pre><code>        @Override
          protected Void doInBackground(Void... params) {
          users = new ArrayList&lt;UserInfo&gt;();
          //ParseQuery&lt;ParseUser&gt; query = ParseUser.getQuery();
  
  
          try {
              ParseQuery&lt;ParseObject&gt; query = new ParseQuery&lt;ParseObject&gt;("following");
              query.whereEqualTo("username", "suma");
              ParseQuery&lt;ParseUser&gt; a = ParseUser.getQuery();
              a.whereMatchesKeyInQuery("username", "follower_username", query);
              a.orderByAscending("createdAt");
              ob = a.find();
              for (ParseObject user : ob) {
                  ParseFile image = (ParseFile) user.get("pic");
                  UserInfo map = new UserInfo();
                  map.setUserName((String) user.get("username"));
                  map.setPic(image.getUrl());
                  users.add(map);
              }
          } catch (ParseException e2) {
              // TODO Auto-generated catch block
              e2.printStackTrace();
          }
          return null;
      }
  </code></pre>
  
  <p>Only if the user have one follower, it work fine otherwise (many followers) the app crashes</p>
  
  <p>Please Help ? </p>