react-native-nodemediaclient
react-native-nodemediaclient copied to clipboard
NodeCameraView not showing camera on Android in React Native V0.60.0
After integrating as per instructions in readme, NodeCameraView not showing camera on Android for React-Native version 0.60.0. Any help please. Thanks
Same issue.. i think this library is not being maintained anymore
@aamirnbs any workaround you found on this.. i am facing same issue
@Dgs-asohail4 @sam17896 I tried many solutions for this issue and ultimately following change in Android Library code worked for me.
In RCTNodeCameraView.java class set isAutoPreview
as true it was false by default.
private Boolean isAutoPreview = true;
I am still testing it to make sure it does not break anything else.
Hope it will work for you!
Yup it works for me.. but i think this is not the problem because we set the property autoPreview from the js files before and it work that way.. the main problem is with requireNativeComponent
or UIManager
the classes that wired up js files with native code.
Thats great! Let me know if you get some other solutions w.r.t. JS only so that we don't need to change the java code anymore. Thanks
Make sure you manually request camera and audio permissions on Android. I was having this same issue because the library doesn't prompt the user for their permissions. Once I did that the camera appeared.
https://facebook.github.io/react-native/docs/permissionsandroid
Yes you are right @jwillingham789 library does not prompt. Even after manually prompting for requests and then opening NodeCameraView, it was not showing the camera.
It does show the camera if all permissions are given and autopreview is set to true. However you cannot start or stop the camera preview without restarting the application. Currently investigating.
Update: This was the problem: https://github.com/facebook/react-native/issues/17968#issuecomment-457236577 - filing a PR soon
Update 2: Fixed in my fork over here: https://github.com/michelalbers/react-native-nodemediaclient - I guess this repo is dead.
Fixed with now merged #50
NodeCameraView is crashing on release apk. Any solutions for this issue? After I give camera & microphone permissions, the app crashes and exits.
NodeCameraView is crashing on release apk. Any solutions for this issue? After I give camera & microphone permissions, the app crashes and exits.
same with me
NodeCameraView is crashing on release apk. Any solutions for this issue? After I give camera & microphone permissions, the app crashes and exits.
same with me
Are you using progaurd rules?
I'm using NodeCameraView for RSTP streaming and geting this error( "expo": "^38.0.0", "react-native": "^0.63.2") Invariant Violation: requireNativeComponent: "RCTNodePCamera" was not found in the UIManager. How i can fix it.
I'm using NodeCameraView for RSTP streaming and geting this error( "expo": "^38.0.0", "react-native": "^0.63.2") Invariant Violation: requireNativeComponent: "RCTNodePCamera" was not found in the UIManager. How i can fix it.
I have the same problem, do you have any news about how to fix it ?
Hi Cephas,
Are you using proguard rules? If so then add in your proguard-rules.pro file these lines
-keep class cn.nodemedia.** {*;} -dontwarn cn.nodemedia.**
basically proguard rules is to shrink your app size & in doing so it removes unused java classes from the project. Sometimes it removes important classes as well & unfortunately it removes nodemedia classes. So we need to add conditions to keep the class. This should fix it.
Hope this helps
On Sun, May 3, 2020 at 8:13 PM Maseruka Cephas @.***> wrote:
NodeCameraView is crashing on release apk. Any solutions for this issue? After I give camera & microphone permissions, the app crashes and exits.
same with me
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NodeMedia/react-native-nodemediaclient/issues/45#issuecomment-623120789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN3XSQBJHVA6NTF2F4HRUOTRPV7KFANCNFSM4IERKDIA .
-- Regards, Ruben Gregory Technical Head Ph. No. - +91-9791291499