ArthurHub / ArthurHub/Android-Image-Cropper

Image to be taken twice to get the crop box

Open
#724 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am working on Android v10 and in order to get the crop box image need to be taken twice.

In the MainActivity I have made the changes at the two places:

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
iv_crop.setOnClickListener {
CropImage.activity()
.setGuidelines(CropImageView.Guidelines.ON)
.start(this)

checkPermissions()
}
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data:
Intent?) {
val file = File(photoFilePath)
if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE
&& file.exists())
{
var result = CropImage.getActivityResult(data)
iv_crop.setImageURI(result.uri)
classifyPhoto(file)

}
}

Thanks for the help in advance

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Android 10 flow from MainActivity.onCreate, including the CropImage.activity call and checkPermissions, then trace the result through onActivityResult. Compare the first and second capture paths and verify that the crop box appears after one capture while the existing file and result handling still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.