Description
Firstly I am not talking about the old architecture and I have already gone through this
This method does not really works for new architecture given how the files are structured
registerForActivityResult can only be used in MainActivity. I need registerForActivityResult for my intent to pick images.
Here is the complete code sample
The issue is I can't call my MainActivity in my Module as the Module file is not part of the main android folder but a separate folder called RTNImagePicker in my case
I get below error if I try to refer MainActivity in my module


I cannot add it as dependency on module as well as it results in circular dependency

React Native Version
0.71.0
Output of npx react-native info
error Unrecognized command "info".
info Run "react-native --help" to see a list of all available commands.
Steps to reproduce
You can download the sample from here and try it out
Snack, code example, screenshot, or link to a repository
https://github.com/BraveEvidence/ReactNativeNewArchregisterForActivityResultTry
Description
Firstly I am not talking about the old architecture and I have already gone through this
This method does not really works for new architecture given how the files are structured
registerForActivityResult can only be used in MainActivity. I need registerForActivityResult for my intent to pick images.
Here is the complete code sample
The issue is I can't call my MainActivity in my Module as the Module file is not part of the main android folder but a separate folder called RTNImagePicker in my case
I get below error if I try to refer MainActivity in my module
I cannot add it as dependency on module as well as it results in circular dependency
React Native Version
0.71.0
Output of
npx react-native infoerror Unrecognized command "info".
info Run "react-native --help" to see a list of all available commands.
Steps to reproduce
You can download the sample from here and try it out
Snack, code example, screenshot, or link to a repository
https://github.com/BraveEvidence/ReactNativeNewArchregisterForActivityResultTry