-
Notifications
You must be signed in to change notification settings - Fork 739
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
Scanning Window Size Issue #130
Comments
This is a real issue for larger screens. I guess it's a problem deeper, i.e. in the zxing library, so don't know what could be done here.. But maybe there is some configuration available I don't know about? I would love to see a solution for this. |
I guess that changing the "MAX_FRAME_WIDTH" and "MAX_FRAME_HEIGHT" in "CameraManager.java" (lines 44 and 45 - https://github.com/wildabeast/BarcodeScanner/blob/master/src/android/LibraryProject/src/com/google/zxing/client/android/camera/CameraManager.java) should solve this one. |
Just wanted to say thanks! |
@isaacbdawson I'm glad I was able to help! |
It's probably a stupid question, but how can I rebuild the zxing dependency? I changed the values in my fork of this plugin, re-added the plugin, but the frame is still 600x400. Thanks in advance. |
Not a stupid question. I had the same issue, as I had never built (or re-built) a library project before. So assuming you have the Android SDK and tools (ie: ant) then what you need to do is go to the directory: yourpoject\plugins\com.phonegap.plugins.barcodescanner\src\android\LibraryProject you'll need to put a local.properties file in this folder, or make one, it only needs one line: then assuming you have all the correct build tools and api packages (i did not, had to open my sdk manager and install build tools 19.1 and api 17) you would just need to run: which will build the executable jar, which for me showed up as: so rename it to: com.google.zxing.client.android.captureactivity.jar also, to avoid removing/re-adding the platform (to redeploy the plugin) i also copied the file to: then just built the project. just fyi, i'm using cordova (cli) on a windows machine, your steps might vary. |
I used another approach. |
Thank you very much, it worked. |
@isaacbdawson could you nicely share the .jar file you have built? Forgive my being a layman of this. (: |
Sure. |
@isaacbdawson thank you. It worked :) |
Thanks isaacbdawson. I tried and built with your jar file. I also struggled to compile a version by my own (first time in my life to build a java) with following setup, but unluckily with still the small scan window. CameraManager.java: |
The only other thing I can think of to try would be to manually copy the jar file to: |
@isaacbdawson Tried overwriting without any change. Then i performed |
@isaacbdawson Could the .jar file work with PhoneGap Build? It appears there are solutions to the orientation issue and the scan area size, but they have not been implemented in the plugin for PhoneGap Build. |
@GTGeek88 I have not tried it myself, but you could certainly give it a shot. |
No, I can't, actually. The plugins used in PhoneGap Build are not controlled by developers. They are picked, approved, and implemented into the PhoneGap Build process by the PhoneGap folks, not you or me. |
Apologies, I thought you were referring to: https://github.com/phonegap-build/BarcodeScanner |
Is it any update on this issue regarding PhoneGap Build applications? As I can see now Adobe even put a subscription over those who want to upload a plugin, so what I was thinking(uploading the library after changing the limits and building the jar) won't work unless I pay them(why would you pay for helping them have more plugins?) |
Crazy. Docs are crap. Support is crap. And now they want money for plugins? |
also...why is this marked as closed? I mean, there is a way to do it, but you have to change the freakin' plugin... i don't get it, why is it so hard to change from pixels to percents so it would work on every device? |
This is marked as closed because I opened the issue, and the solution resolved the issue for me, so I closed it. In my case I am using Cordova, so the PhoneGap Build issues would be a separate issue altogether. |
yes, but that doesn't solve the plugin itself, it's just a fix in which you just have to rebuild the plugin with the sources... |
The default values have been increased upstream: |
they have been increased but not for phonegap build plugin |
I've changed CameraManager.java to: |
i think you need to rebuild the android library after changing this values it would be nice to control this values from PhoneGap :) |
It would be realy nice if it were possible to set this via an option in the config.xml when building with PhoneGap Build. We don't use the CLI at the moment, so we're not able to modify and recompile the library. |
@radumvlad I deleted the the android library than ran it! and nothing changed! |
Guys, too late for a question? I tried the solution that @isaacbdawson provided but I'm getting Multiple dex files error when trying to run "ionic build android".
Any idea about what I'm doing wrong? Thank you! |
For those of us creating an HTML5 app, then wrapping with PhoneGap build, any easy way to add this support for larger scan windows? |
You can include .jar file which I have created with bigger viewfinder area. |
I change the size from CameraManager.java and later I cleaned both proyects and I found a problem with the size of the screen, I Just wanna take all size, but when I'm testing I found which I put the cellphone on landscape take the correct size but if I put to the horizontal position not work correctly, this is because take the size of the screen before to invoke camera scanner, I made a little change like this...
I only invert the values of width and height, I made this because this is real size if you want take all size from the screen, when you invoke scanner always starts on landscape position, I hope this helps, regards. |
The scan window on the galaxy s5 is just ridiculous.
Any ideas how to fix this?
The text was updated successfully, but these errors were encountered: