1

I have an Android app which opens the camera to take a pic:

  Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  startActivityForResult(intent, PICTURE_RESULT);

If it is called the camera is opened and I can take picture. But the preview where to click OK or Cancel is already very bad quality.

This is strange as this is not implemented by my app. Are there any parameters to configure for the camera intent to increase the quality.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
tobias
  • 2,322
  • 3
  • 33
  • 53

1 Answers1

0

This example im uploading to firebase:

   @Override
protected void onActivityResult(int requestCode, int resultCode, Intent    data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (requestCode == GALLERY_INTENT && resultCode == RESULT_OK){
        Uri uri = data.getData();
        progressDialog.setMessage(UPLOADING);
        progressDialog.show();
        StorageReference filePath = storageRef.child(STORAGE_FOLDER_NAME).child(recipeTitle.getText().toString());
        filePath.putFile(uri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
            @Override
            public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                Toast.makeText(CreateNewRecipeActivity.this, UPLOAD_COMPLETE, Toast.LENGTH_SHORT).show();
                progressDialog.dismiss();
            }
        });
    }
}

Here im getting the full image

Uri uri = data.getData();
Anders Sørensen
  • 426
  • 1
  • 4
  • 14
  • Thx. I am not talking about getting the image. It is a step before. Android lets the user take pic and shows it and gives the option to say oK or Redo. And this image is low quality. But I think the reason is that I dont give a place to store. – tobias Sep 11 '17 at 08:59
  • 1
    Ahh ok, yeah found out myself you get better image if you save it and get it afterwards, misunderstood you. Hope it fixes it then. – Anders Sørensen Sep 11 '17 at 09:01