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

Android: Update zxing core library; Fix example #89

Merged
merged 4 commits into from
Dec 17, 2018
Merged

Android: Update zxing core library; Fix example #89

merged 4 commits into from
Dec 17, 2018

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Oct 2, 2018

  • fixed example: callback was called twice on Android because isiOS was true
  • updated Android zxing core library to 3.3.3
  • added preventRotation (default: true) to allow rotation of the camera

@m1ga m1ga mentioned this pull request Oct 2, 2018
@m1ga m1ga changed the title Fix example Android: Update zxing core library; Fix example Oct 3, 2018
@@ -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)) {
Copy link
Contributor

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?

Copy link
Contributor Author

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 :) )

Copy link
Contributor

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);
Copy link
Contributor

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));
Copy link
Contributor

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.

@ypbnv
Copy link
Contributor

ypbnv commented Nov 6, 2018

@m1ga Thank you for the PR. I left some comments regarding the documentation of the changes.

@m1ga
Copy link
Contributor Author

m1ga commented Nov 6, 2018

@ypbnv Thanks, I'll add the documentation!

Copy link
Contributor

@ypbnv ypbnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass

@garymathews garymathews merged commit 086a659 into tidev:master Dec 17, 2018
@m1ga m1ga deleted the example branch December 18, 2018 09:20
@m1ga
Copy link
Contributor Author

m1ga commented Dec 20, 2018

sorry, forgot to release the draft! It's released now 😄

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

Successfully merging this pull request may close these issues.

3 participants