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

Add internal QR code reader #42

Merged
merged 1 commit into from Jul 13, 2017

Conversation

Projects
None yet
2 participants
@zaeleus
Contributor

zaeleus commented Jul 11, 2017

WALLETH uses the external application Barcode Scanner to read QR codes.
This dependency creates an awkward UX if the user does not already have
it installed on their device. This patch implements a basic QR code
scanner activity to be used for application-wide scanning and removes
the dependency on Barcode Scanner.

The scanner does require the camera permission, which is in the
dangerous permission group. This can be granted or denied at install
time on devices running API level < 23 or at run time on devices running
API level >= 23.

Some future improvements to consider:

  • Determine an ideal camera preview size. The default size is provided
    by the camera driver, which is most commonly 1920x1080 and may or may
    not match the size of the preview surface.

  • Maintain the aspect ratio of the preview surface. The surface
    stretches to the size of its parent container. On most devices, the
    distortion is minimal since the preview size and display aspect ratios
    are very similar or the same.

  • Handle 180° device rotations. The camera display orientation is not
    updated unless the activity is restarted, which is not triggered when
    rotating the device 180°. This means the camera preview will appear
    upside down, though scanning will still operate normally. The
    workaround is to rotate the device by 90° twice.

Fixes #18

Add internal QR code reader
WALLETH uses the external application Barcode Scanner to read QR codes.
This dependency creates an awkward UX if the user does not already have
it installed on their device. This patch implements a basic QR code
scanner activity to be used for application-wide scanning and removes
the dependency on Barcode Scanner.

The scanner does require the camera permission, which is in the
[dangerous permission] group. This can be granted or denied at install
time on devices running API level < 23 or at run time on devices running
API level >= 23.

Some future improvements to consider:

  * Determine an ideal camera preview size. The default size is provided
  by the camera driver, which is most commonly 1920x1080 and may or may
  not match the size of the preview surface.

  * Maintain the aspect ratio of the preview surface. The surface
  stretches to the size of its parent container. On most devices, the
  distortion is minimal since the preview size and display aspect ratios
  are very similar or the same.

  * Handle 180° device rotations. The camera display orientation is not
  updated unless the activity is restarted, which is not triggered when
  rotating the device 180°. This means the camera preview will appear
  upside down, though scanning will still operate normally. The
  workaround is to rotate the device by 90° twice.

Fixes #18

[dangerous permission]: https://developer.android.com/guide/topics/permissions/requesting.html#perm-groups
@ligi

This comment has been minimized.

Show comment
Hide comment
@ligi

ligi Jul 12, 2017

Member

Thanks! Looks good - will merge soon - just need a bit of hands-on with it before - probably tonight

Member

ligi commented Jul 12, 2017

Thanks! Looks good - will merge soon - just need a bit of hands-on with it before - probably tonight

@ligi ligi referenced this pull request Jul 13, 2017

Open

Disable Multidex #43

@ligi ligi merged commit 2cf750d into walleth:master Jul 13, 2017

@ligi

This comment has been minimized.

Show comment
Hide comment
@ligi

ligi Jul 13, 2017

Member

Can you please add your information to the contributors.json file I created in the root of this project? The nick must match your github-nick. I want to distribute some WALL tokens to contributors in the futur and this json helps me to keep track and have the mapping to ETH-addresses.
Also I will release a version with this change soon - will also contain TREZOR support.

Member

ligi commented Jul 13, 2017

Can you please add your information to the contributors.json file I created in the root of this project? The nick must match your github-nick. I want to distribute some WALL tokens to contributors in the futur and this json helps me to keep track and have the mapping to ETH-addresses.
Also I will release a version with this change soon - will also contain TREZOR support.

@ligi

This comment has been minimized.

Show comment
Hide comment
@ligi

ligi Jul 14, 2017

Member

Interesting side effect of this PR:

selection_131

Writing a policy as we speak - but as IANAL - would be nice if someone could have a look over it ;-)

Member

ligi commented Jul 14, 2017

Interesting side effect of this PR:

selection_131

Writing a policy as we speak - but as IANAL - would be nice if someone could have a look over it ;-)

ligi added a commit that referenced this pull request Jul 14, 2017

Add privacy policy
follow up for #42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment