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

Contact not imported on Samsung devices when Base64 embedded image present #58

Open
pepperit-bxl opened this issue May 3, 2021 · 1 comment

Comments

@pepperit-bxl
Copy link

Hi,
When you embed a base64 string image using
vCard.photo.embedFromString('iVBORw0KGgoAAAANSUhEUgAAA2...', 'image/png'); the card cannot be imported on Samsung devices. I tried on different Samsung devices. It shows "Unable to load data".

The card imports correclty on iOS devices and on Windows computers.

When I modify the VCF file manually by adding an additional \r\n at the end of the base64 string, it can be imported correctly on Samsung devices and others.

Could you please have a look?

Best regards
Julien

NOT WORKING ON SAMSUNG DEVICES

BEGIN:VCARD
VERSION:3.0
FN;CHARSET=UTF-8:TestJulien TestBarbé
N;CHARSET=UTF-8:TestBarbé;TestJulien;;;
EMAIL;CHARSET=UTF-8;type=WORK,INTERNET:[email protected]
PHOTO;ENCODING=b;TYPE=image/jpeg:/9j/4AAQSkZJRgABAgAAZABkAAD/7AA [...] 9xHwt2bpyq6k+nuI0rh6aIpJ9JE13UVM6B1elBof//Z
TEL;TYPE=CELL:+3223473912
ADR;CHARSET=UTF-8;TYPE=WORK:;;Rue Neuve 1;;;;
ORG;CHARSET=UTF-8:TestPepper IT
REV:2021-05-02T21:03:37.622Z
END:VCARD

WORKING ON ALL DEVICES (mind the \r\n after the base 64 string)

BEGIN:VCARD
VERSION:3.0
FN;CHARSET=UTF-8:TestJulien TestBarbé
N;CHARSET=UTF-8:TestBarbé;TestJulien;;;
EMAIL;CHARSET=UTF-8;type=WORK,INTERNET:[email protected]
PHOTO;ENCODING=b;TYPE=image/jpeg:/9j/4AAQSkZJRgABAgAAZABkAAD/7AA [...] 9xHwt2bpyq6k+nuI0rh6aIpJ9JE13UVM6B1elBof//Z

TEL;TYPE=CELL:+3223473912
ADR;CHARSET=UTF-8;TYPE=WORK:;;Rue Neuve 1;;;;
ORG;CHARSET=UTF-8:TestPepper IT
REV:2021-05-02T21:03:37.622Z
END:VCARD

@BB-BenBridges
Copy link

Doesn't seem to be an issue any more. Worked fine on a Samsung A40 running Android 11, Samsung contacts version 12.7.20.3

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

No branches or pull requests

2 participants