markusfisch / BinaryEye

Yet another barcode scanner for Android
https://play.google.com/store/apps/details?id=de.markusfisch.android.binaryeye
MIT License
1.39k stars 114 forks source link

Errors reading vCards #326

Closed SnejPro closed 10 months ago

SnejPro commented 1 year ago

I wrote my own QR code generator website: https://cdn.snejp.de/qrcode/

I recognised two errors occuring when i scan generated vCards with BinaryEye.

Types in TEL, EMAIL and ADR were not handled correctly

Following RFC 6350 (https://www.rfc-editor.org/rfc/rfc6350#section-6.4.1), TEL, EMAIL, and ADR can include a TYPE parameter that specifies, for example, whether the phone number is a home or work number. But when i scan the QR code with Binary Code, the follow is recognised: git_screen_1 git_screen_2

Adding a contact does not contain the address

This could be an Android error, as it also occurs at https://play.google.com/store/apps/details?id=com.google.zxing.client.android.

git_screen_3

cyb3rko commented 1 year ago

I can confirm issues with vCards. In my case the address is found, but it has added some newlines.

Furthermore I have the same issues with telephone and address types.


That's what the Google Camera finds:

And that's what Binary Eye finds:

The raw content:


So explicitly including the TYPE keyword is not working.
If you remove the TYPE keyword and just write WORK, it's working.

Most likely applies to @SnejPro case as well.
The RFC includes the TYPE keyword in the example, but almost every real-life example just drops that keyword, I don't know why.

markusfisch commented 1 year ago

Thanks for reporting this! 👍 And sorry for the late answer.

I will try to sort this out as soon as I find some time.

clst commented 1 year ago

Hi there. Thanks for the great app. Just a quick question: since this issue is still open: Does Binary Eye do the complete parsing (into an Intent) because there is no mechanism for vcards in Android or because importing a vcard does not give the user an interface to select anything about the import process?

markusfisch commented 1 year ago

@clst Yes, VCard's are parsed here, and no, there's no UI to let a user manually interfere.

markusfisch commented 10 months ago

Fixed in https://github.com/markusfisch/BinaryEye/commit/c604ad5ef234ee4c2ef37c4548afd97c989185d1

Version 1.61.0 is on it's way through Google Play and should become available soon.