How to add Crop Feature to Camera Intent or Gallery Intent & in Web-view?or In JavaScript
<p>I followed <a href="https://github.com/OpenGeeksMe/Android-File-Chooser/blob/master/app/src/main/java/it/floryn90/webapp/MainActivity.java" rel="nofollow noreferrer">this</a> to Capture or Choose File from Web-view and Upload...This is perfect and working for all android versions..</p>

<p>So over there I want to Add Crop Intent... To crop After Camera Capturing/Gallery then Upload all this Happen From Webview</p>

<p><strong>I got <a href="https://stackoverflow.com/a/35498670/5010291">this</a> intent to add for Crop Image.. I want to add this in MainActivity.. In Both Capture form Camera and Gallery</strong>..</p>

<pre><code>Intent cropIntent = new Intent("com.android.camera.action.CROP");
// indicate image type and Uri
cropIntent.setDataAndType(data.getData(), "image/*");
cropIntent.putExtra(MediaStore.EXTRA_OUTPUT, getTempUri());
cropIntent.putExtra("outputFormat",
        Bitmap.CompressFormat.JPEG.toString());
// set crop properties
cropIntent.putExtra("crop", "true");
// indicate aspect of desired crop
cropIntent.putExtra("aspectX", 1);
cropIntent.putExtra("aspectY", 1);
// indicate output X and Y
cropIntent.putExtra("outputX", 256);
cropIntent.putExtra("outputY", 256);
// retrieve data on return
cropIntent.putExtra("return-data", true);
// start the activity - we handle returning in
// onActivityResult
startActivityForResult(cropIntent, 3);
</code></pre>

<p>So It may Be camera or Gallery I want to Crop and Upload..</p>

<p>Can Any one suggest me How to add Crop Intent to Main activity..</p>

<p><strong>Update 1</strong></p>

<p>I Have a Intent to capture camera And View gallery.. In the similar way I have option for Crop Intent... But I want to apply this crop for Both camera intent and gallery but all these need to happen in webview(Mainactivity)...</p>

<p>Please Check my <a href="https://github.com/OpenGeeksMe/Android-File-Chooser/blob/master/app/src/main/java/it/floryn90/webapp/MainActivity.java" rel="nofollow noreferrer">Mainactivity</a>... Before answering..</p>

<p>I want to add Crop Intent fro camera intent and Gallery intent.. and it should able to upload... with min resolution... not more than 2megapixel.. if less than also no problem... like <a href="https://stackoverflow.com/questions/35498004/how-to-use-camera-intent-with-crop-intent-both-at-one-intent-in-webview/35498670#35498670">this</a> at bitmap...</p>

<p>In update I have again added same links don't get confused...</p>

<p>All here It needs to crop and upload in webview...</p>

<p><strong>Update 2</strong></p>

<p>Is it possible use <a href="https://github.com/jdamcd/android-crop" rel="nofollow noreferrer">this</a> Library in my MainActivity... In case of camera capture from web-view crop and upload in same webview...</p>