-
Notifications
You must be signed in to change notification settings - Fork 774
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
Camera never appearing #108
Comments
Hi, be sure to set every background transparent, as specified in docs, otherwise you will not be able to see camera preview. In my case i had to set the css property "background: none" to html, body and jQuery mobile page. Qhen it's done scanning, revert every background to what it was before. |
There is no camera preview but can scan qrcode and gain the text. I try to set every item background transparent but not work. Do I write the wrong code?
scss - file
|
As far as i can tell ypur code is incomplete ( there is also a typo: This is the code used in my app to make Camera Preview work: I actually use jQuery to dinamically change these css properties:
|
Thanks for your reminder of my write error. I just set the ion-content It is not similar to the the example image. There is no box in the middle |
Yes, you have to add it yourself. Just create a transparent image with a box in the middle and set the image as background. |
Got it, thank you very much. |
You are welcome! |
hi @Story5 could you share your code as a starter template? Would be amazing! |
@romanrast Hi, romanrast. here is my demo (qrscannerdemo), I just achieve showing a camera preview, but haven't code for a qrscanner view with a scanner background. Hope it can help! |
Hi, I have tried this code but for me it is not opening camera for android as well as iphone any tips. |
There is a bug in the browser version. (browser version has got memory leak if you call show after scan, on android version you need to call show()) I have tested Story5 approach, which i think nice, but unfortunately not working. There is a nav-decor in the css which should be transparent, i'm not sure, what is doing. Instead of the push you need to use setRoot - the push means just add a new layer increasing the z-index, which does not solve any problem with the layer transparency. Story5 solution anyway is good, if you have bunch of embedded content, just remove them from the root, and put back, when the camera is off, because now you have much less pain, just the simple page with some control button. |
I resolved this issue by adding the following css. Hope this can help someone. |
Looks like this issue has been solved. Please feel free to open a new issue if you're still having trouble. |
I'm not using Ionic, is there any solution? My camera didn't appear since I click my button to scan. Is there any best practice for this plugin? |
@daksamedia try cloning this repo and running the tests for a working example. See the Readme for more details. |
@bitjson I already tested it, but still didn't work. I'm using framework7 anyway. Is it possible? |
What didn't work about it? Did the tests fail on your devices? This plugin should work for all Cordova projects, javascript frameworks shouldn't matter. |
@bitjson it's work in browser, but in my android device my camera didn't open. on prepare action it gave a response, but camera didn't show up. |
Trying to reproduce – when you ran the generated tests on Android, which buttons did you click/what order? |
Worked great in Android, but in IOS is not showing the camera preview |
I am running Cordova 6.4 along with Sencha Touch. The plugin is installed successfully but when I call the scan() method the camera in iOS and Android is not popping up. I can see when I open up the object that it says scanning and camera showing is true, in yet I see not camera. Anyone know what could be going on here?
The text was updated successfully, but these errors were encountered: