How to use react-native-openalpr - 10 common examples

To help you get started, we’ve selected a few react-native-openalpr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RobertSasak / react-native-openalpr / example / App.js View on Github external
const countryOptions = [
  { label: 'eu', value: 'eu' },
  { label: 'us', value: 'us' },
]

export default class App extends Component {
  state = {
    showOptions: false,
    plate: 'Point at a plate',
    confidence: '',
    error: null,
    showCamera: false,
    // Camera options
    camera: {
      aspect: Aspect.fill,
    },
    captureQuality: CaptureQuality.medium,
    aspect: CaptureQuality.stretch,
    rotateMode: false,
    torchMode: false,
    showPlateOutline: true,
    plateOutlineColor: '#ff0000',
    country: 'eu',
    touchToFocus: true,
  }

  async componentDidMount() {
    this.checkPermission()
  }

  async checkPermission() {
github RobertSasak / react-native-openalpr / example / App.js View on Github external
const colorOptions = [
  { label: 'Red', value: '#ff0000' },
  { label: 'Green', value: '#00ff00' },
  { label: 'Blue', value: '#0000ff' },
]

const aspectOptions = [
  { label: 'Fill', value: Aspect.fill },
  { label: 'Fit', value: Aspect.fit },
  { label: 'Stretch', value: Aspect.stretch },
]

const qualityOptions = [
  { label: 'Low', value: CaptureQuality.low },
  { label: 'Medium', value: CaptureQuality.medium },
  { label: 'High', value: CaptureQuality.high },
]

const countryOptions = [
  { label: 'eu', value: 'eu' },
  { label: 'us', value: 'us' },
]

export default class App extends Component {
  state = {
    showOptions: false,
    plate: 'Point at a plate',
    confidence: '',
    error: null,
    showCamera: false,
    // Camera options
github RobertSasak / react-native-openalpr / example / App.js View on Github external
{ label: 'eu', value: 'eu' },
  { label: 'us', value: 'us' },
]

export default class App extends Component {
  state = {
    showOptions: false,
    plate: 'Point at a plate',
    confidence: '',
    error: null,
    showCamera: false,
    // Camera options
    camera: {
      aspect: Aspect.fill,
    },
    captureQuality: CaptureQuality.medium,
    aspect: CaptureQuality.stretch,
    rotateMode: false,
    torchMode: false,
    showPlateOutline: true,
    plateOutlineColor: '#ff0000',
    country: 'eu',
    touchToFocus: true,
  }

  async componentDidMount() {
    this.checkPermission()
  }

  async checkPermission() {
    switch (await check(cameraPermission)) {
      case RESULTS.UNAVAILABLE:
github RobertSasak / react-native-openalpr / example / App.js View on Github external
const colorOptions = [
  { label: 'Red', value: '#ff0000' },
  { label: 'Green', value: '#00ff00' },
  { label: 'Blue', value: '#0000ff' },
]

const aspectOptions = [
  { label: 'Fill', value: Aspect.fill },
  { label: 'Fit', value: Aspect.fit },
  { label: 'Stretch', value: Aspect.stretch },
]

const qualityOptions = [
  { label: 'Low', value: CaptureQuality.low },
  { label: 'Medium', value: CaptureQuality.medium },
  { label: 'High', value: CaptureQuality.high },
]

const countryOptions = [
  { label: 'eu', value: 'eu' },
  { label: 'us', value: 'us' },
]

export default class App extends Component {
  state = {
    showOptions: false,
    plate: 'Point at a plate',
    confidence: '',
    error: null,
    showCamera: false,
    // Camera options
    camera: {
github RobertSasak / react-native-openalpr / example / App.js View on Github external
{ label: 'us', value: 'us' },
]

export default class App extends Component {
  state = {
    showOptions: false,
    plate: 'Point at a plate',
    confidence: '',
    error: null,
    showCamera: false,
    // Camera options
    camera: {
      aspect: Aspect.fill,
    },
    captureQuality: CaptureQuality.medium,
    aspect: CaptureQuality.stretch,
    rotateMode: false,
    torchMode: false,
    showPlateOutline: true,
    plateOutlineColor: '#ff0000',
    country: 'eu',
    touchToFocus: true,
  }

  async componentDidMount() {
    this.checkPermission()
  }

  async checkPermission() {
    switch (await check(cameraPermission)) {
      case RESULTS.UNAVAILABLE:
        this.setState({
github RobertSasak / react-native-openalpr / example / App.js View on Github external
confidence,
      touchToFocus,
    } = this.state
    return (
github RobertSasak / react-native-openalpr / Example / index.ios.js View on Github external
{
            this.camera = cam;
          }}
          style={styles.preview}
          aspect={this.state.camera.aspect}
          captureQuality={Camera.constants.CaptureQuality.medium}
          country="us"
          onPlateRecognized={this.onPlateRecognized}
          plateOutlineColor="#ff0000"
          showPlateOutline
          torchMode={Camera.constants.TorchMode.off}
          touchToFocus
        />
        
        
        
      

    );
  }
}
github RobertSasak / react-native-openalpr / Example / index.ios.js View on Github external
constructor(props) {
    super(props);

    this.camera = null;

    this.state = {
      camera: {
        aspect: Camera.constants.Aspect.fill,
      },
      plate: 'Scan a plate',
    };
  }
github RobertSasak / react-native-openalpr / example / App.js View on Github external
style={styles.picker}>
      {values.map(({ label, value }) => (
        
      ))}
    
  
)

const colorOptions = [
  { label: 'Red', value: '#ff0000' },
  { label: 'Green', value: '#00ff00' },
  { label: 'Blue', value: '#0000ff' },
]

const aspectOptions = [
  { label: 'Fill', value: Aspect.fill },
  { label: 'Fit', value: Aspect.fit },
  { label: 'Stretch', value: Aspect.stretch },
]

const qualityOptions = [
  { label: 'Low', value: CaptureQuality.low },
  { label: 'Medium', value: CaptureQuality.medium },
  { label: 'High', value: CaptureQuality.high },
]

const countryOptions = [
  { label: 'eu', value: 'eu' },
  { label: 'us', value: 'us' },
]

export default class App extends Component {