Open rodrigofbm opened 6 years ago
I had similar issue, Add the following lines in AndroidManifest.xml to give permission to access camera. This fixed.
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
Also replace
this._listeners = [ //this.props.navigator.navigationContext.addListener('didfocus', viewAppearCallBack) ]
With
this.timer = setTimeout( () => { this.setState({ viewAppear: true, }) }, 255)
Also add
this.timer && clearTimeout(this.timer);
in the componentWillUnmount ()
@rodrigofbm , @KesavSundarM , Hi , You should give permissions from device settings, or you can use react-native-permissions.
I had similar issue, Add the following lines in AndroidManifest.xml to give permission to access camera. This fixed.
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.VIBRATE"/> <uses-feature android:name="android.hardware.camera"/> <uses-feature android:name="android.hardware.camera.autofocus"/>
Also replace
this._listeners = [ //this.props.navigator.navigationContext.addListener('didfocus', viewAppearCallBack) ]
With
this.timer = setTimeout( () => { this.setState({ viewAppear: true, }) }, 255)
Also add
this.timer && clearTimeout(this.timer);
in the componentWillUnmount ()
i did it ,but i does not work,it still balck screen
My code above. On the app just show a black screen. PS: I'm not using navigation, but rn router flux