kelvin
kelvin

Reputation: 11

How to mirror the camera from "com.budiyev.android.codescanner.CodeScannerView"

The camera works perfectly and has shown the front facing camera, but is there any way to mirror the camera?

Xml :

<com.budiyev.android.codescanner.CodeScannerView
        android:id="@+id/scanner_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:frameColor="#D8B761"
        app:frameCornersSize="300dp"
        app:frameWidth="5dp"
        app:maskColor="#FEF9F0"
        app:squareFrame="true"
        app:autoFocusButtonColor="@android:color/white"
        app:flashButtonColor="@android:color/white"
        app:autoFocusButtonVisible="true"
        app:flashButtonVisible="true"/>

Activity :

private CodeScanner mCodeScanner;

mCodeScanner = CodeScanner.builder()
.formats(CodeScanner.ALL_FORMATS)
.autoFocus(true)
.autoFocusMode(AutoFocusMode.SAFE)
.autoFocusInterval(2000L)
.flash(false)
.camera(1)
.onDecoded(new DecodeCallback()

Upvotes: 0

Views: 1680

Answers (1)

Eldo Martadjaya
Eldo Martadjaya

Reputation: 96

the dependency

implementation 'com.budiyev.android:code-scanner:2.1.0'

is no longer working, replace with:

implementation 'com.github.yuriy-budiyev:code-scanner:2.3.0'

Refer to the code scanner library.

Upvotes: 0

Related Questions