title: Scaling down photo taken by camera and getting the picture Path
body: <p>I am trying to scale the photos taken with a camera, but i am not sure where or how to do this. Right now the code is accessing the camera, taking a picture and displaying it in a listview, i would like to also get the picture path but am unsure how to do this aswell. Any help would be highly appreciated.</p>
  
  <pre><code>/**
       * This function is called when the add player picture button is clicked.
       * It accesses the devices gallery and the user can choose a picture
       * from the gallery.
       * Or if the user chooses to take a picture with the camera, it handles that
       */
  
      @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
          switch (requestCode) {
          case TAKE_PICTURE:
              if (resultCode == Activity.RESULT_OK) {
                  Uri selectedImage = imageUri;
                  getContentResolver().notifyChange(selectedImage, null);
                  ContentResolver cr = getContentResolver();
                  this.picPath = selectedImage.getPath();
                  Bitmap bitmap;
                  try {
                       bitmap = android.provider.MediaStore.Images.Media
                       .getBitmap(cr, selectedImage);
                      imageView = (ImageView) findViewById(R.id.imagePlayer); 
                      imageView.setImageBitmap(bitmap);
                      Toast.makeText(this, selectedImage.toString(),
                              Toast.LENGTH_LONG).show();
                  } catch (Exception e) {
                      Toast.makeText(this, "Failed to load", Toast.LENGTH_SHORT)
                              .show();
                      Log.e("Camera", e.toString());
                  }
              }
  </code></pre>
  
  <p>Thanks</p>