vue-quagga icon indicating copy to clipboard operation
vue-quagga copied to clipboard

Vue-quagga doesn't ask to use device's camera

Open Kuseraga-git opened this issue 5 years ago • 1 comments

Hi, i'd like to use this solution in my cordova app but when i launch my app i don't have the pop-up who allow the application to use the camera of my device.

It show me this : app_result

It only works if i go inside the application's settings and check manualy the autorisation but it's totaly not practice. Do you have any solutions ?

Kuseraga-git avatar May 21 '19 09:05 Kuseraga-git

I resolved my problem but i found a solution by opening with cordova's camera plugin the camera of the device, now i have the authorization on my app.

But now the problem is that I always have what i post upper, I use the code write on the github to declare and use Vue-Quagga :

<template>
    <div id="scan">
        <v-quagga :onDetected="logIt" :readerSize="readerSize" :readerTypes="['code_128_reader']" 
        style="right: 11px; bottom: 6px;"></v-quagga>
    </div>
</template>

<script>
import VueQuagga from 'vue-quaggajs'
import Vue from 'vue'

Vue.use(VueQuagga)
export default {
    name: 'scan',
    data () {
        return {
            readerSize: {
                width: 700,
                height: 480
            },
            detecteds: []
        }
    },
    methods: {
        logIt (data) {
            console.log(data)
        }
    }
}
</script>

Kuseraga-git avatar May 22 '19 09:05 Kuseraga-git