title: Cannot Retrieve Query from Current User - Parse (Android)
body: <p>I'm trying to retrieve an image from the current user to display as a profile picture. </p>
  
  <p>I can quite easily get it to work by inserting a specific object ID after <code>query.getInBackground()</code> What I want to do is to pull the "profilePicture" of the user currently logged in, hence current User, and not just one specific user. How can I fix this?</p>
  
  <pre><code>        progressDialog = ProgressDialog.show(GalleryActivity.this, "",
                  "Downloading Image...", true);
  
          // Locate the class table named "ImageUpload" in Parse.com
          ParseQuery&lt;ParseUser&gt; query = ParseUser.getQuery();
  
          // Locate the objectId from the class
  
          ParseUser currentUser = ParseUser.getCurrentUser();
          query.getInBackground(String.valueOf(ParseUser.getCurrentUser()),
                  new GetCallback&lt;ParseUser&gt;() {
  
                      public void done(ParseUser object,
                                       ParseException e) {
                          // TODO Auto-generated method stub
  
                          // Locate the column named "ImageName" and set
                          // the string
                          ParseFile fileObject = (ParseFile) object
                                  .get("profilePicture");
                          fileObject
                                  .getDataInBackground(new GetDataCallback() {
  
                                      public void done(byte[] data,
                                                       ParseException e) {
                                          if (e == null) {
                                              Log.d("test",
                                                      "We've got data in data.");
                                              // Decode the Byte[] into
                                              // Bitmap
                                              Bitmap bmp = BitmapFactory
                                                      .decodeByteArray(
                                                              data, 0,
                                                              data.length);
  
                                              // Get the ImageView from
                                              // main.xml
                                              ImageView image = (ImageView) findViewById(R.id.galleryProfilePic);
  
                                              // Set the Bitmap into the
                                              // ImageView
  
                                              Bitmap resized = Bitmap.createScaledBitmap(bmp, 300, 300, true);
                                              Bitmap conv_bm = getRoundedRectBitmap(resized, 300);
  
                                              image.setImageBitmap(conv_bm);
  
                                              // Close progress dialog
                                              progressDialog.dismiss();
  
                                          } else {
                                              Log.d("test",
                                                      "There was a problem downloading the data.");
                                              ImageView image = (ImageView) findViewById(R.id.galleryProfilePic);
                                              image.setImageResource(R.drawable.ic_default_profile_picture);
                                          }
                                      }
                                  });
                      }
                  });
  </code></pre>