markusfisch/BinaryEye

Can't copy data of a binary QR

Radiokot opened this issue ยท 2 comments

Hi Markus ๐Ÿ‘‹๐Ÿป I like your scanner because it shows the raw QR data without data type prefixes or end padding. It helps me to debug custom QRs, but I really miss the ability to copy HEX data.

Currently, if the QR content can't be decoded as text, there are no "Copy" and "Share" buttons on the decoded code, and you have to write it as a file:

However, in the code there is the ability to copy HEX instead of text if the code is binary:

R.id.copy_to_clipboard -> {
copyToClipboard(textOrHex())
maybeBackOrFinish()
true

But the "Copy" button gets hidden when the code is binary:

if (isBinary) {
menu.findItem(R.id.copy_to_clipboard).isVisible = false
menu.findItem(R.id.create).isVisible = false
}

Is this a bug or feature? If the buttons are actually meant to be available for binary content, I'll submit a PR with the fix.

Hi Radiokot, this is a bug actually! Good catch!

Line 303 is a remnant from before there was textOrHex() and should be removed. So, if you like to do a PR please go ahead! Otherwise I would fix it, if you wouldn't mind.

Many thanks for clarifying, will submit the fix soon.