Compress camera image before upload
I am using this code (from www.internetria.com ) to take a photo and upload to a server: onCreate: Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Uri output = Uri.fromFile(new File(foto)); intent.putExtra(MediaStore.EXTRA_OUTPUT, output); startActivityForResult(intent, TAKE_PICTURE); onActivityResult: ImageView iv = (ImageView) findViewById(R.id.imageView1); iv.setImageBitmap(BitmapFactory.decodeFile(foto)); File file = new File(foto); if (file.exists()) { UploaderFoto nuevaTarea = new UploaderFoto(); nuevaTarea.execute(foto); } else Toast.makeText(getApplicationContext(), "No se