Why camera in KaiOS emulator (B2G) not working?

111 views Asked by At

I want to make a QR Scan with KaiOS technologies, but that is not working in the KaiOS emulator. I'm using emulator version 2.2. But, I try on the web browser, the camera is worked.

1

There are 1 answers

0
Kiran Jadhav On BEST ANSWER

On KaiOS phones, you have to make use of mozActivities like below:

var cameraActivity = new MozActivity({
    name: "pick",
    data: {
        type: ["image/*"]
    }
});

cameraActivity.onsuccess = function () {
    console.log('The received photo blob is' + this.result.blob);
};

cameraActivity.onerror = function () {
    console.error('Unable to open camera from device ');
};

Kindly refer to this link here for further details.