Example how to take photo and upload it’s thumbnail to your server using okhttp3 (first I convert it to jpeg)

Categories: ANDROID like

//part when you click on item and start camera imageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Context context = v.getContext(); if (takePictureIntent.resolveActivity(context.getPackageManager()) != null) { startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE); } } }); //part when you get the thumbnail from camera @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { […]