Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QRScanner is missing 'destroy' #1916

Closed
andrews05 opened this issue Aug 23, 2017 · 4 comments
Closed

QRScanner is missing 'destroy' #1916

andrews05 opened this issue Aug 23, 2017 · 4 comments

Comments

@andrews05
Copy link

The ionic-native QRScanner implementation doesn't appear to support the destroy method. I believe this method is important to turn off the camera and save battery once you're done scanning. Unless there's something I'm missing/not understanding?

@Inconspicuously
Copy link
Contributor

Agreed. This is an issue I ran into when trying to solve another problem https://forum.ionicframework.com/t/qrscanner-camera-preview-is-not-removed/105104

I've made the required changes and have submitted a pull request. In the meantime you can add the destroy method manually by editing the index.d.ts and index.metadata.json files.

@andrews05
Copy link
Author

@Inconspicuously Thanks! Your PR appears to be closed?

@Inconspicuously
Copy link
Contributor

Yes, I realised it wasn't building properly and then did a fantastic job of messing up the merges, which finally resulted in me starting over with a new repository. I have now figured out how I'm supposed to test it properly before attempting to do a PR.
This is my first ever plugin fix and PR, and although it shouldn't be all that complicated, I've learned the hard way that there are some pretty vital steps you need to take.
I closed the PR so that I could get everything fixed up properly first. Please excuse my inexperience, I come from a non technical background and frequently find that I have large gaps in my education regarding certain common technologies, such as github. I'll get there eventually :)
I'll (hopefully) have everything fixed tomorrow.

@andrews05
Copy link
Author

No worries :)
I don't expect this to appear in an official update anytime soon anyway, so in the meantime I've just calling QRScanner.destroy() directly.

Inconspicuously added a commit to Inconspicuously/ionic-native that referenced this issue Sep 15, 2017
Inconspicuously added a commit to Inconspicuously/ionic-native that referenced this issue Sep 15, 2017
ihadeed pushed a commit that referenced this issue Sep 27, 2017
fix(qr-scanner): added destroy method (#1916)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants