react-native-photo-editor icon indicating copy to clipboard operation
react-native-photo-editor copied to clipboard

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

Open hammadamjad opened this issue 3 years ago • 2 comments

hammadamjad avatar Sep 24 '22 16:09 hammadamjad

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) }

    }
  }
}

}

huynhuchuy2001 avatar Nov 05 '22 12:11 huynhuchuy2001

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

Bassiuz avatar Nov 07 '22 11:11 Bassiuz