I want the good quality image to show in ImageView and upload to the server. I have searched the Internet, StackOverflow and GitHub, but I could not find the answer, maybe somebody knows how can fix it?
protected void onActivityResult(int requestCode, int resultCode, Intent imageReturnedIntent) { //work android
    super.onActivityResult(requestCode, resultCode, imageReturnedIntent);
    imageReturnedIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri);//try
    if (resultCode == RESULT_OK ) {// work every android than need click OK
      //working
        Uri selectedImage = imageReturnedIntent.getData();//convert to for bitmap that can send
        Bundle extras = imageReturnedIntent.getExtras();//finish converting and copy the image
        bitmap = extras.getParcelable("data");//receive image to bitmap
        imageView.setImageBitmap(bitmap);
onCreate:
btnCamera.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
            //intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
            startActivityForResult(intent, 0);
        }
    });
What is wrong here?