Closed SwagatRanjit84 closed 5 years ago
Have you tried to pass flex: 1 to style component ?
<DocumentScanner
style={{
flex: 1, <------- Try it
width: width,
height: height,
backgroundColor: '#fff'
}}
onPictureTaken={data =>{
console.log(data.path)
}}
enableTorch={false}
detectionCountBeforeCapture={5}
/>
@andreluisjunqueira I have made it working cheers to this library.
@SwagatRanjit84 Can you tell us how it works cause i have black screen
@SwagatRanjit84 How did you get this to work?
@MahmoudElmoghazy @AGollapalli It worked on react native version 0.57.8, after adding implementation 'com.android.support:support-v4:27.1.1' implementation 'com.android.support:appcompat-v7:27.0.2' implementation 'com.android.support:design:27.1.0' in android/app/build.gradle.
@SwagatRanjit84 Not working can you give us more info please
This working for me
"react": "^16.8.1", "react-native": "^0.58.4", "react-native-documentscanner-android": "git+https://github.com/thongdn/react-native-documentscanner-android.git#develop",
I have build and run the project successfully. But its showing black screen and there is no camera or anything that reflects document scanner. Is this library uncompleted? I have a doubt on it.
App.js code
/**
import React, {Component} from 'react'; import {PermissionsAndroid, Platform, StyleSheet, Text, View} from 'react-native'; import DocumentScanner from 'react-native-documentscanner-android';
import Camera from 'react-native-camera'; const width = '100%'; const height = '100%';
export default class App extends Component {
render() { return (
} } const styles = StyleSheet.create({ container: { flex: 1, width: '100%', height: '100%', backgroundColor: '#fff' } });