Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task :baronha_react-native-photo-editor:compileDebugKotlin FAILED #34

Open
hammadamjad opened this issue Sep 24, 2022 · 2 comments
Open

Comments

@hammadamjad
Copy link

No description provided.

@huynhuchuy2001
Copy link

change this file works for me /@baronha/react-native-photo-editor/android/src/main/java/com/reactnativephotoeditor

private val mActivityEventListener: ActivityEventListener = object : BaseActivityEventListener() {
override fun onActivityResult(activity: Activity, requestCode: Int, resultCode: Int, intent: Intent?) {
if (requestCode == EDIT_SUCCESSFUL) {
when (resultCode) {
ResponseCode.RESULT_OK -> {
val path = intent?.getStringExtra("path")
promise?.resolve("file://$path")
}
ResponseCode.RESULT_CANCELED -> {
promise?.reject("USER_CANCELLED", "User has cancelled", null)
}
ResponseCode.LOAD_IMAGE_FAILED -> {
val path = intent?.getStringExtra("path")
promise?.reject("LOAD_IMAGE_FAILED", "Load image failed: $path", null)
}

    }
  }
}

}

@Bassiuz
Copy link

Bassiuz commented Nov 7, 2022

Thanks for the suggestion @huynhuchuy2001, i made a pull request to add these changes to the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants