GithubHelp home page GithubHelp logo

tjieco / cordova-plugin-barcodescanner-browser-support Goto Github PK

View Code? Open in Web Editor NEW

This project forked from phonegap/phonegap-plugin-barcodescanner

3.0 3.0 1.0 15.02 MB

cross-platform BarcodeScanner for Cordova / PhoneGap

License: MIT License

JavaScript 37.80% Java 12.68% Objective-C++ 41.03% CSS 1.53% C# 6.96%

cordova-plugin-barcodescanner-browser-support's People

Contributors

agrieve avatar basvanbeek avatar cepm-nate avatar cfjedimaster avatar claaslange avatar eccenux avatar eddyverbruggen avatar emarashliev avatar filmaj avatar huserben avatar jariztia avatar jaysonraymond avatar jcesarmobile avatar jlowe234 avatar khayong avatar macdonst avatar mlaponder avatar nadyaa avatar patrickbussmann avatar renanbandeira avatar ryanwfiorini avatar sarangan12 avatar scheideman avatar sgrebnov avatar stevengill avatar stigok avatar timwindsor avatar tjieco avatar umcsdon avatar vladimir-kotikov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

goedzo

cordova-plugin-barcodescanner-browser-support's Issues

Browser not using back-side camera. Device ID cannot be set with input = "barcodeScanDevice"

Looking at the code, it assumes that device id 0 is the back-camera. However on my phone (Samsung Galaxy S10) it is different:

[{"deviceId":"17e5a41bbe3c7c3e48e78bf8aaa34e4b9dbfc0c79ff6b366220c90c10c906f6a",
"label":"camera2 1, facing front"},{"deviceId":"70c376f23218bb2a6692ac2950346140
4bb833608cb2753c169998f016a1c0be","label":"camera2 3, facing front"},{"deviceId"
:"2b792a7806ebbd3ccd6f726e80aec22c2e950514b9d546b012a27a8241e43fc3","label":"cam
era2 2, facing back"},{"deviceId":"56615a90c09f59fc7ebaccf1a1139c3b178c2655429dc
2938a4dbe33b668e981","label":"camera2 0, facing back"}]

Now it would be possible to set this by adding an input field "barcodeScanDevice".

However the code reads it like this:
deviceId = document.getElementById("barcodeScanDevice");
Which returns an HTML element instead of the value of the actual textbox. function startScan(deviceId, assumes deviceId is an int, but here it is not an int.

# Element activity#com.google.zxing.client.android.CaptureActivity at AndroidManifest.xml:89:9-311 duplicated with element declared at AndroidManifest.xml:21:9-26:20

Actual Behaviour

Getting error manifest merger
These lines are added when I add the barcode plugin, and cordova build fails. But when these line are commented it is working fine.

<!--<activity android:clearTaskOnLaunch="true" android:configChanges="orientation|keyboardHidden|screenSize" android:exported="false" android:name="com.google.zxing.client.android.CaptureActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden" />-->
        <!--<activity android:label="Share" android:name="com.google.zxing.client.android.encode.EncodeActivity" />-->

Plugins Installed

I have 2 plugins
-- Barcode scanner
-- Camera plugin

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android 6.0 +

Cordova CLI version and cordova platform version

cordova --version
  8.1.2 ([email protected])
cordova platforms
  android 7.1.4

Plugin version

cordova plugin version | grep phonegap-plugin-barcodescanner
phonegap-plugin-barcodescanner 7.1.22 "BarcodeScanner"

Logs taken while reproducing problem

Element activity#com.google.zxing.client.android.CaptureActivity at AndroidManifest.xml:89:9-311 duplicated with element declared at AndroidManifest.xml:21:9-26:20
AppName/platforms/android/app/src/main/AndroidManifest.xml Error:
Validation failed, exiting

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugManifest'.
    Manifest merger failed with multiple errors, see logs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.