-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Android: Update zxing core library; Fix example #89
Conversation
@@ -221,7 +221,7 @@ private void resume(){ | |||
|
|||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); | |||
|
|||
if (prefs.getBoolean(PreferencesActivity.KEY_DISABLE_AUTO_ORIENTATION, true)) { | |||
if (prefs.getBoolean(PreferencesActivity.KEY_DISABLE_AUTO_ORIENTATION, true) && intent.getBooleanExtra(Intents.Scan.PREVENT_ROTATION, true)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually have a place in the code that sets the KEY_DISABLE_AUTO_ORIENTATION value in the shared preferences?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, but it was in there. The module had a properties UI where you could make those changes. There is a lot of code in there that shouldn't be in the module but in your own app, like checking for links etc (which makes is bloated). But that should be a different ticket (or a new module :) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Let's leave it as is for the purpose of this PR then.
@@ -296,10 +296,11 @@ public void capture(@Kroll.argument(optional = true) HashMap args) { | |||
|
|||
intent.putExtra(Intents.Scan.SHOW_RECTANGLE, argsDict.optBoolean("showRectangle", true)); | |||
intent.putExtra(Intents.Scan.KEEP_OPEN, argsDict.optBoolean("keepOpen", false)); | |||
|
|||
frameWidth = argsDict.optInt("frameWidth", 0); | |||
frameHeight = argsDict.optInt("frameHeight",0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I got it right this will define the frame in where the barcode is supposed to be placed? If that is correct it will be good to include this in the docs as well.
intent.putExtra(Intents.Scan.SHOW_INFO_TEXT, argsDict.optBoolean("showInfoText", false)); | ||
intent.putExtra(Intents.Scan.PREVENT_ROTATION, argsDict.optBoolean("preventRotation", true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be described in the documentation too, I think.
@m1ga Thank you for the PR. I left some comments regarding the documentation of the changes. |
@ypbnv Thanks, I'll add the documentation! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: Pass
sorry, forgot to release the draft! It's released now 😄 |
preventRotation
(default: true) to allow rotation of the camera