What happened with getDeviceById method?
See original GitHub issueHi there,
I was using the 1.3.0 version and today I have updated it to 1.5.0. After that, I have found that the getDeviceById
method from the ZXingScannerComponent
class does not exists anymore. So my question is what happened with this method? Have you changed the name or removed it? If it has been removed, is there any other method to get the device ID?
I did my code following your plunker demo (https://embed.plnkr.co/MN4riU/) and it is something like this:
<zxing-scanner #scanner start="true" [device]="selectedDevice"
(scanSuccess)="handleQrCodeResult($event)"
(scanError)="handleQrCodeResult($event, true)"
(camerasNotFound)="camerasNotFound($event)"
(camerasFound)="camerasFound($event)"
(permissionResponse)="permissionResponse($event)"></zxing-scanner>
@Component({
selector: 'app-qr-reader',
templateUrl: './qr-reader.component.html',
styleUrls: ['./qr-reader.component.scss']
})
export class QrReaderComponent implements OnInit {
@ViewChild('scanner') scanner: ZXingScannerComponent;
onDeviceSelectChange(selectedValue: string) {
this.selectedDevice = this.scanner.getDeviceById(selectedValue);
}
[..]
Thanks for your help!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Class InputSystem | Package Manager UI website
This method adds a new usage to the device's set of usages. If the device already has the given usage, the method does...
Read more >insynctive - npm Package Health Analysis - Snyk
{?Device} getDeviceById(id) - returns a Device object if found. This method assumes that call getDevices() has been already made.
Read more >Troubleshooting memory leak when streaming serial device data to ...
I am building an application in Windows that can communicate with multiple serial devices. Sending and receiving data to a device is handled...
Read more >golifx package - github.com/Arrendy/golifx - Go Packages
SubscriptionProvider, see the documentation for those methods below. ... NewClient returns a pointer to a new Client and any error that occurred ......
Read more >angular populate disabled input field on a button click
Button click also happens in second component. I tried Input Output, but it seems this is only for parent-child connection.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, my fault. It happens that I didn’t remember that there was such changes, it was a long time since I coded this release. Looks like a lot more people is using this lib now so I gotta be careful.
team: me (hey!) 😆
Get device by ID is out, it was removed from 1.3 to 1.5. You can still filter devices by ID like this: