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
Fragment not attached to a context #356
Comments
Same problem. Navigation from fragment to fragment and then immediate crash. and (415e9f03-c85b-432f-86d3-c007690ba0c9) not attached to a context. It works if you put registerImagePicker in your activity and not fragment. |
Any luck with the issue?. In Android OS: 11 Camera only also does not work. App crash after taking picture. |
For temp solution I am using method in fragment val intent = createImagePickerIntent(requireContext(), config) override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
private val launcher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result -> |
This should be fixed |
temporary use this code
|
Any solution for this problem? I use version '2.2.0' |
I tried also same exceptions |
Declare a top level class SignUpFragment : Fragment() {
private lateinit var imagePickerLauncher: ImagePickerLauncher
override fun onAttach(context: Context) {
super.onAttach(context)
imagePickerLauncher = registerImagePicker {
}
}
} |
Expected Behavior
Should open imager picker from fragment
Actual Behavior
Fragment h{9e363cc} (782f797a-94b7-4939-b68b-a5a1b80e4374) not attached to a context.
App crashed
Steps to Reproduce the Problem
val launcher = registerImagePicker { imageList: List -> }
Specifications
The text was updated successfully, but these errors were encountered: