How to connect angular 4 web app to mobile camera?How do I get ASP.NET Web API to return JSON instead of XML using Chrome?ASP.NET Web API - PUT & DELETE Verbs Not Allowed - IIS 8ASP.NET Web API 2: How do I log in with external authentication services?ASP.NET Web API social authentication for Web and Mobilehow to access the azure web app application setting values in to typescript fileGet Json object from url (web api) with angular 2 & TypescriptUpload a File with ng2-Uploader (Angular2) & .net corehow to publish(File system publish) Angular 2 web application from Visual Studio 2015Running a Angular front-end written in TypeScript in a C# Web API project?How to use Angular 4 project developed in Visual Studio 2015 to Angular 6 using Visual Studio Code?

Why do we need explainable AI?

Would you recommend a keyboard for beginners with or without lights in keys for learning?

Integration of Interpolated function take an unacceptable amount of time

Why is a pressure canner needed when canning?

Is there any difference between these two sentences? (Adverbs)

Shoes for commuting

How can I implement regular expressions on an embedded device?

Time to call the bluff

If I sell my PS4 game disc and buy a digital version, can I still access my saved game?

How to find better food in airports

Does an antenna tuner remove standing waves from a transmission line?

How do I stop making people jump at home and at work?

If p-value is exactly 1 (1.0000000), what are the confidence interval limits?

If magnetic force can't do any work, then how can we define a potential?

Is there any reason to change the ISO manually?

Can doublestrike kill a creature with totem armor?

What is the statistical difference between "choose either total" or "choose new total" when rerolling damage die?

Why are all volatile liquids combustible

Using processing toolbox conditionally in QGIS?

Has Rey's new lightsaber been seen before in canon or legends?

How can I describe hit point damage without talking about wounds?

How do I anonymously report the Establishment Clause being broken?

Can I transfer my Australian ETA to my new passport or must I re-apply?

How do I delete cookies from a specific site?



How to connect angular 4 web app to mobile camera?


How do I get ASP.NET Web API to return JSON instead of XML using Chrome?ASP.NET Web API - PUT & DELETE Verbs Not Allowed - IIS 8ASP.NET Web API 2: How do I log in with external authentication services?ASP.NET Web API social authentication for Web and Mobilehow to access the azure web app application setting values in to typescript fileGet Json object from url (web api) with angular 2 & TypescriptUpload a File with ng2-Uploader (Angular2) & .net corehow to publish(File system publish) Angular 2 web application from Visual Studio 2015Running a Angular front-end written in TypeScript in a C# Web API project?How to use Angular 4 project developed in Visual Studio 2015 to Angular 6 using Visual Studio Code?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















Here am using angular 4 web API in visual studio 2015 (updated 3).
Now i want to search an item using bar code in mobile devices. how to be done this process please note that am a beginner in angular so please help me for this solution i search so many site but i could not get or understand the idea. anyone please help me for finding the solution.
(TS file and Html file)










share|improve this question
































    2















    Here am using angular 4 web API in visual studio 2015 (updated 3).
    Now i want to search an item using bar code in mobile devices. how to be done this process please note that am a beginner in angular so please help me for this solution i search so many site but i could not get or understand the idea. anyone please help me for finding the solution.
    (TS file and Html file)










    share|improve this question




























      2












      2








      2


      1






      Here am using angular 4 web API in visual studio 2015 (updated 3).
      Now i want to search an item using bar code in mobile devices. how to be done this process please note that am a beginner in angular so please help me for this solution i search so many site but i could not get or understand the idea. anyone please help me for finding the solution.
      (TS file and Html file)










      share|improve this question
















      Here am using angular 4 web API in visual studio 2015 (updated 3).
      Now i want to search an item using bar code in mobile devices. how to be done this process please note that am a beginner in angular so please help me for this solution i search so many site but i could not get or understand the idea. anyone please help me for finding the solution.
      (TS file and Html file)







      angular html5 typescript asp.net-web-api






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 4:13







      Rider

















      asked Mar 28 at 3:48









      RiderRider

      1781 silver badge15 bronze badges




      1781 silver badge15 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          2
















          I am not sure would it work, but you can try @zxing:



          Step 1 - Install npm packages:



          npm install --save @zxing/library @zxing/ngx-scanner


          Step 2 - Add to your app.module.ts:



          import ZXingScannerModule from '@angular/forms';


          Note: remember to add this library in 'import' section



          Step 3 - Implement .component.ts:



          import Component, OnInit, ViewChild from '@angular/core';
          import ZXingScannerComponent from '@zxing/ngx-scanner';
          import Result from '@zxing/library';
          @Component(
          selector: 'app-root',
          templateUrl: './app.component.html',
          styleUrls: ['./app.component.css']
          )
          export class AppComponent implements OnInit

          @ViewChild('scanner')
          scanner: ZXingScannerComponent;
          hasDevices: boolean;
          hasPermission: boolean;
          qrResultString: string;
          qrResult: Result;
          availableDevices: MediaDeviceInfo[];
          currentDevice: MediaDeviceInfo;

          ngOnInit(): void
          this.scanner.camerasFound.subscribe((devices: MediaDeviceInfo[]) =>
          this.hasDevices = true;
          this.availableDevices = devices;
          );
          this.scanner.camerasNotFound.subscribe(() => this.hasDevices = false);
          this.scanner.scanComplete.subscribe((result: Result) => this.qrResult = result);
          this.scanner.permissionResponse.subscribe((perm: boolean) => this.hasPermission = perm);


          displayCameras(cameras: MediaDeviceInfo[])
          this.availableDevices = cameras;


          handleQrCodeResult(resultString: string)
          this.qrResultString = resultString;


          onDeviceSelectChange(selectedValue: string)
          this.currentDevice = this.scanner.getDeviceById(selectedValue);




          Step 4 - Implement .component.html



          <div style="width: 50%" class="scanner-shell" [hidden]="!hasDevices">
          <header>
          <select (change)="onDeviceSelectChange($event.target.value)">
          <option value="" [selected]="!currentDevice">No Device Selected</option>
          <option *ngFor="let device of availableDevices" [value]="device.deviceId"
          [selected]="currentDevice && device.deviceId === currentDevice.deviceId">
          device.label
          </option>
          </select>
          </header>
          <zxing-scanner #scanner start="true" [device]="currentDevice"
          (scanSuccess)="handleQrCodeResult($event)"
          [formats]="['QR_CODE', 'EAN_13','CODE_128', 'DATA_MATRIX']"></zxing-scanner>
          <section class="results" *ngIf="qrResultString">
          <small>Result: </small>
          <strong> qrResultString </strong>
          </section>




          Result:



          As a result, once you open this component on any device, the browser will ask you for access to your device camera. If you will grand it, you should be able to pick camera from dropdown and then, if you scan with it Qr code or bar code, you should see its outcome on the view.



          Note: You have to allow camera to be used by applications in your System Settings. For Windows 10, you can do it in Camera privacy settings -> Allow apps to access your camera






          share|improve this answer

























          • sure will check

            – Rider
            Mar 28 at 7:44











          • Did it work? Any problems?

            – Wojciech X
            Apr 10 at 5:22











          • i got another method.

            – Rider
            Apr 11 at 10:32


















          2
















          Enter the function in TS file



           constructor(private zone: NgZone){
          window.angularComponentReference =
          zone: this.zone,
          componentFn: (searchcontent: any) => this.scannerOutput(searchcontent),
          component: this,
          ;



          // And write the function

          barcode()
          if (typeof Android !== "undefined" && Android !== null)
          Android.openScanner();

          else
          alert("sorry no item");




          And index.html



           function scannerOutput(searchcontent) 
          window.angularComponentReference.zone.run(() =>
          window.angularComponentReference.componentFn(searchcontent); );






          share|improve this answer





























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389879%2fhow-to-connect-angular-4-web-app-to-mobile-camera%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2
















            I am not sure would it work, but you can try @zxing:



            Step 1 - Install npm packages:



            npm install --save @zxing/library @zxing/ngx-scanner


            Step 2 - Add to your app.module.ts:



            import ZXingScannerModule from '@angular/forms';


            Note: remember to add this library in 'import' section



            Step 3 - Implement .component.ts:



            import Component, OnInit, ViewChild from '@angular/core';
            import ZXingScannerComponent from '@zxing/ngx-scanner';
            import Result from '@zxing/library';
            @Component(
            selector: 'app-root',
            templateUrl: './app.component.html',
            styleUrls: ['./app.component.css']
            )
            export class AppComponent implements OnInit

            @ViewChild('scanner')
            scanner: ZXingScannerComponent;
            hasDevices: boolean;
            hasPermission: boolean;
            qrResultString: string;
            qrResult: Result;
            availableDevices: MediaDeviceInfo[];
            currentDevice: MediaDeviceInfo;

            ngOnInit(): void
            this.scanner.camerasFound.subscribe((devices: MediaDeviceInfo[]) =>
            this.hasDevices = true;
            this.availableDevices = devices;
            );
            this.scanner.camerasNotFound.subscribe(() => this.hasDevices = false);
            this.scanner.scanComplete.subscribe((result: Result) => this.qrResult = result);
            this.scanner.permissionResponse.subscribe((perm: boolean) => this.hasPermission = perm);


            displayCameras(cameras: MediaDeviceInfo[])
            this.availableDevices = cameras;


            handleQrCodeResult(resultString: string)
            this.qrResultString = resultString;


            onDeviceSelectChange(selectedValue: string)
            this.currentDevice = this.scanner.getDeviceById(selectedValue);




            Step 4 - Implement .component.html



            <div style="width: 50%" class="scanner-shell" [hidden]="!hasDevices">
            <header>
            <select (change)="onDeviceSelectChange($event.target.value)">
            <option value="" [selected]="!currentDevice">No Device Selected</option>
            <option *ngFor="let device of availableDevices" [value]="device.deviceId"
            [selected]="currentDevice && device.deviceId === currentDevice.deviceId">
            device.label
            </option>
            </select>
            </header>
            <zxing-scanner #scanner start="true" [device]="currentDevice"
            (scanSuccess)="handleQrCodeResult($event)"
            [formats]="['QR_CODE', 'EAN_13','CODE_128', 'DATA_MATRIX']"></zxing-scanner>
            <section class="results" *ngIf="qrResultString">
            <small>Result: </small>
            <strong> qrResultString </strong>
            </section>




            Result:



            As a result, once you open this component on any device, the browser will ask you for access to your device camera. If you will grand it, you should be able to pick camera from dropdown and then, if you scan with it Qr code or bar code, you should see its outcome on the view.



            Note: You have to allow camera to be used by applications in your System Settings. For Windows 10, you can do it in Camera privacy settings -> Allow apps to access your camera






            share|improve this answer

























            • sure will check

              – Rider
              Mar 28 at 7:44











            • Did it work? Any problems?

              – Wojciech X
              Apr 10 at 5:22











            • i got another method.

              – Rider
              Apr 11 at 10:32















            2
















            I am not sure would it work, but you can try @zxing:



            Step 1 - Install npm packages:



            npm install --save @zxing/library @zxing/ngx-scanner


            Step 2 - Add to your app.module.ts:



            import ZXingScannerModule from '@angular/forms';


            Note: remember to add this library in 'import' section



            Step 3 - Implement .component.ts:



            import Component, OnInit, ViewChild from '@angular/core';
            import ZXingScannerComponent from '@zxing/ngx-scanner';
            import Result from '@zxing/library';
            @Component(
            selector: 'app-root',
            templateUrl: './app.component.html',
            styleUrls: ['./app.component.css']
            )
            export class AppComponent implements OnInit

            @ViewChild('scanner')
            scanner: ZXingScannerComponent;
            hasDevices: boolean;
            hasPermission: boolean;
            qrResultString: string;
            qrResult: Result;
            availableDevices: MediaDeviceInfo[];
            currentDevice: MediaDeviceInfo;

            ngOnInit(): void
            this.scanner.camerasFound.subscribe((devices: MediaDeviceInfo[]) =>
            this.hasDevices = true;
            this.availableDevices = devices;
            );
            this.scanner.camerasNotFound.subscribe(() => this.hasDevices = false);
            this.scanner.scanComplete.subscribe((result: Result) => this.qrResult = result);
            this.scanner.permissionResponse.subscribe((perm: boolean) => this.hasPermission = perm);


            displayCameras(cameras: MediaDeviceInfo[])
            this.availableDevices = cameras;


            handleQrCodeResult(resultString: string)
            this.qrResultString = resultString;


            onDeviceSelectChange(selectedValue: string)
            this.currentDevice = this.scanner.getDeviceById(selectedValue);




            Step 4 - Implement .component.html



            <div style="width: 50%" class="scanner-shell" [hidden]="!hasDevices">
            <header>
            <select (change)="onDeviceSelectChange($event.target.value)">
            <option value="" [selected]="!currentDevice">No Device Selected</option>
            <option *ngFor="let device of availableDevices" [value]="device.deviceId"
            [selected]="currentDevice && device.deviceId === currentDevice.deviceId">
            device.label
            </option>
            </select>
            </header>
            <zxing-scanner #scanner start="true" [device]="currentDevice"
            (scanSuccess)="handleQrCodeResult($event)"
            [formats]="['QR_CODE', 'EAN_13','CODE_128', 'DATA_MATRIX']"></zxing-scanner>
            <section class="results" *ngIf="qrResultString">
            <small>Result: </small>
            <strong> qrResultString </strong>
            </section>




            Result:



            As a result, once you open this component on any device, the browser will ask you for access to your device camera. If you will grand it, you should be able to pick camera from dropdown and then, if you scan with it Qr code or bar code, you should see its outcome on the view.



            Note: You have to allow camera to be used by applications in your System Settings. For Windows 10, you can do it in Camera privacy settings -> Allow apps to access your camera






            share|improve this answer

























            • sure will check

              – Rider
              Mar 28 at 7:44











            • Did it work? Any problems?

              – Wojciech X
              Apr 10 at 5:22











            • i got another method.

              – Rider
              Apr 11 at 10:32













            2














            2










            2









            I am not sure would it work, but you can try @zxing:



            Step 1 - Install npm packages:



            npm install --save @zxing/library @zxing/ngx-scanner


            Step 2 - Add to your app.module.ts:



            import ZXingScannerModule from '@angular/forms';


            Note: remember to add this library in 'import' section



            Step 3 - Implement .component.ts:



            import Component, OnInit, ViewChild from '@angular/core';
            import ZXingScannerComponent from '@zxing/ngx-scanner';
            import Result from '@zxing/library';
            @Component(
            selector: 'app-root',
            templateUrl: './app.component.html',
            styleUrls: ['./app.component.css']
            )
            export class AppComponent implements OnInit

            @ViewChild('scanner')
            scanner: ZXingScannerComponent;
            hasDevices: boolean;
            hasPermission: boolean;
            qrResultString: string;
            qrResult: Result;
            availableDevices: MediaDeviceInfo[];
            currentDevice: MediaDeviceInfo;

            ngOnInit(): void
            this.scanner.camerasFound.subscribe((devices: MediaDeviceInfo[]) =>
            this.hasDevices = true;
            this.availableDevices = devices;
            );
            this.scanner.camerasNotFound.subscribe(() => this.hasDevices = false);
            this.scanner.scanComplete.subscribe((result: Result) => this.qrResult = result);
            this.scanner.permissionResponse.subscribe((perm: boolean) => this.hasPermission = perm);


            displayCameras(cameras: MediaDeviceInfo[])
            this.availableDevices = cameras;


            handleQrCodeResult(resultString: string)
            this.qrResultString = resultString;


            onDeviceSelectChange(selectedValue: string)
            this.currentDevice = this.scanner.getDeviceById(selectedValue);




            Step 4 - Implement .component.html



            <div style="width: 50%" class="scanner-shell" [hidden]="!hasDevices">
            <header>
            <select (change)="onDeviceSelectChange($event.target.value)">
            <option value="" [selected]="!currentDevice">No Device Selected</option>
            <option *ngFor="let device of availableDevices" [value]="device.deviceId"
            [selected]="currentDevice && device.deviceId === currentDevice.deviceId">
            device.label
            </option>
            </select>
            </header>
            <zxing-scanner #scanner start="true" [device]="currentDevice"
            (scanSuccess)="handleQrCodeResult($event)"
            [formats]="['QR_CODE', 'EAN_13','CODE_128', 'DATA_MATRIX']"></zxing-scanner>
            <section class="results" *ngIf="qrResultString">
            <small>Result: </small>
            <strong> qrResultString </strong>
            </section>




            Result:



            As a result, once you open this component on any device, the browser will ask you for access to your device camera. If you will grand it, you should be able to pick camera from dropdown and then, if you scan with it Qr code or bar code, you should see its outcome on the view.



            Note: You have to allow camera to be used by applications in your System Settings. For Windows 10, you can do it in Camera privacy settings -> Allow apps to access your camera






            share|improve this answer













            I am not sure would it work, but you can try @zxing:



            Step 1 - Install npm packages:



            npm install --save @zxing/library @zxing/ngx-scanner


            Step 2 - Add to your app.module.ts:



            import ZXingScannerModule from '@angular/forms';


            Note: remember to add this library in 'import' section



            Step 3 - Implement .component.ts:



            import Component, OnInit, ViewChild from '@angular/core';
            import ZXingScannerComponent from '@zxing/ngx-scanner';
            import Result from '@zxing/library';
            @Component(
            selector: 'app-root',
            templateUrl: './app.component.html',
            styleUrls: ['./app.component.css']
            )
            export class AppComponent implements OnInit

            @ViewChild('scanner')
            scanner: ZXingScannerComponent;
            hasDevices: boolean;
            hasPermission: boolean;
            qrResultString: string;
            qrResult: Result;
            availableDevices: MediaDeviceInfo[];
            currentDevice: MediaDeviceInfo;

            ngOnInit(): void
            this.scanner.camerasFound.subscribe((devices: MediaDeviceInfo[]) =>
            this.hasDevices = true;
            this.availableDevices = devices;
            );
            this.scanner.camerasNotFound.subscribe(() => this.hasDevices = false);
            this.scanner.scanComplete.subscribe((result: Result) => this.qrResult = result);
            this.scanner.permissionResponse.subscribe((perm: boolean) => this.hasPermission = perm);


            displayCameras(cameras: MediaDeviceInfo[])
            this.availableDevices = cameras;


            handleQrCodeResult(resultString: string)
            this.qrResultString = resultString;


            onDeviceSelectChange(selectedValue: string)
            this.currentDevice = this.scanner.getDeviceById(selectedValue);




            Step 4 - Implement .component.html



            <div style="width: 50%" class="scanner-shell" [hidden]="!hasDevices">
            <header>
            <select (change)="onDeviceSelectChange($event.target.value)">
            <option value="" [selected]="!currentDevice">No Device Selected</option>
            <option *ngFor="let device of availableDevices" [value]="device.deviceId"
            [selected]="currentDevice && device.deviceId === currentDevice.deviceId">
            device.label
            </option>
            </select>
            </header>
            <zxing-scanner #scanner start="true" [device]="currentDevice"
            (scanSuccess)="handleQrCodeResult($event)"
            [formats]="['QR_CODE', 'EAN_13','CODE_128', 'DATA_MATRIX']"></zxing-scanner>
            <section class="results" *ngIf="qrResultString">
            <small>Result: </small>
            <strong> qrResultString </strong>
            </section>




            Result:



            As a result, once you open this component on any device, the browser will ask you for access to your device camera. If you will grand it, you should be able to pick camera from dropdown and then, if you scan with it Qr code or bar code, you should see its outcome on the view.



            Note: You have to allow camera to be used by applications in your System Settings. For Windows 10, you can do it in Camera privacy settings -> Allow apps to access your camera







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 28 at 6:54









            Wojciech XWojciech X

            665 bronze badges




            665 bronze badges















            • sure will check

              – Rider
              Mar 28 at 7:44











            • Did it work? Any problems?

              – Wojciech X
              Apr 10 at 5:22











            • i got another method.

              – Rider
              Apr 11 at 10:32

















            • sure will check

              – Rider
              Mar 28 at 7:44











            • Did it work? Any problems?

              – Wojciech X
              Apr 10 at 5:22











            • i got another method.

              – Rider
              Apr 11 at 10:32
















            sure will check

            – Rider
            Mar 28 at 7:44





            sure will check

            – Rider
            Mar 28 at 7:44













            Did it work? Any problems?

            – Wojciech X
            Apr 10 at 5:22





            Did it work? Any problems?

            – Wojciech X
            Apr 10 at 5:22













            i got another method.

            – Rider
            Apr 11 at 10:32





            i got another method.

            – Rider
            Apr 11 at 10:32













            2
















            Enter the function in TS file



             constructor(private zone: NgZone){
            window.angularComponentReference =
            zone: this.zone,
            componentFn: (searchcontent: any) => this.scannerOutput(searchcontent),
            component: this,
            ;



            // And write the function

            barcode()
            if (typeof Android !== "undefined" && Android !== null)
            Android.openScanner();

            else
            alert("sorry no item");




            And index.html



             function scannerOutput(searchcontent) 
            window.angularComponentReference.zone.run(() =>
            window.angularComponentReference.componentFn(searchcontent); );






            share|improve this answer































              2
















              Enter the function in TS file



               constructor(private zone: NgZone){
              window.angularComponentReference =
              zone: this.zone,
              componentFn: (searchcontent: any) => this.scannerOutput(searchcontent),
              component: this,
              ;



              // And write the function

              barcode()
              if (typeof Android !== "undefined" && Android !== null)
              Android.openScanner();

              else
              alert("sorry no item");




              And index.html



               function scannerOutput(searchcontent) 
              window.angularComponentReference.zone.run(() =>
              window.angularComponentReference.componentFn(searchcontent); );






              share|improve this answer





























                2














                2










                2









                Enter the function in TS file



                 constructor(private zone: NgZone){
                window.angularComponentReference =
                zone: this.zone,
                componentFn: (searchcontent: any) => this.scannerOutput(searchcontent),
                component: this,
                ;



                // And write the function

                barcode()
                if (typeof Android !== "undefined" && Android !== null)
                Android.openScanner();

                else
                alert("sorry no item");




                And index.html



                 function scannerOutput(searchcontent) 
                window.angularComponentReference.zone.run(() =>
                window.angularComponentReference.componentFn(searchcontent); );






                share|improve this answer















                Enter the function in TS file



                 constructor(private zone: NgZone){
                window.angularComponentReference =
                zone: this.zone,
                componentFn: (searchcontent: any) => this.scannerOutput(searchcontent),
                component: this,
                ;



                // And write the function

                barcode()
                if (typeof Android !== "undefined" && Android !== null)
                Android.openScanner();

                else
                alert("sorry no item");




                And index.html



                 function scannerOutput(searchcontent) 
                window.angularComponentReference.zone.run(() =>
                window.angularComponentReference.componentFn(searchcontent); );







                share|improve this answer














                share|improve this answer



                share|improve this answer








                answered Jul 29 at 9:12


























                community wiki





                Rider































                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389879%2fhow-to-connect-angular-4-web-app-to-mobile-camera%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                    155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해