Comments (10)
Try another encoding, for ex. utf-16
from custom-qr-generator.
Hm, your implementation of vcard is really broken on ios. Try this website. It decodes your vcard normally. I think the reason is exactly ios phonebook
from custom-qr-generator.
OH, I founded the problem, its about VERSION:4.0, 3.0 is work, ios phonebook can't read correctly with 4.0 Vcard
from custom-qr-generator.
Thank you for helping me <3
from custom-qr-generator.
thank you for helping
from custom-qr-generator.
I want to create new VCard(4.0) and the charset is not working.
fun interface NewQrData : QrData {
data class VCard(
val id: String? = null,
val full_name: String? = null,
val phoneNumber: String? = null,
val email: String? = null,
val gender: String? = null,
val lastUpdated: Long? = null,
val timeZone: String? = null,
val company: String? = null,
val note: String? = null,
) : QrData {
override fun encode(): String = buildString {
append("BEGIN:VCARD\n")
append("VERSION:4.0\n")
if (full_name != null) {
append("FN:${full_name}\n")
append("KIND:individual\n")
append("N:${full_name}\n")
}
if (id != null) {
append("UID:$id\n")
}
if (phoneNumber != null)
append("TEL:${phoneNumber}\n")
if (email != null)
append("EMAIL:${email}\n")
if (gender != null) {
if (gender == Contains.MALE)
append("GENDER:M\n")
else
append("GENDER:FM\n")
}
if (timeZone != null) {
append("TZ:$timeZone\n")
}
if (company != null)
append("ORG:$company\n")
if (note != null) {
append("NOTE:$note\n")
}
append("END:VCARD")
}
}
}
from custom-qr-generator.
Charset is passed as a hint for zxing lib. Tbh i can’t do anything here. What name are u trying to encode?
from custom-qr-generator.
I used your QRData.VCard charset still ok, but when I use NewQrData its not working
val qrCodeVCard = generateVCardUserQRCode(user)
val drawableBitmap = QrCodeDrawable(
qrCodeVCard, qrLogoGolf, Charsets.UTF_8
)
private fun generateVCardUserQRCode(user: User): QrData {
val timeZone = TimeZone.getDefault().id
return NewQrData.VCard(
id = user.id,
full_name = user.full_name,
phoneNumber = user.phone_number,
email = user.email,
gender = user.gender,
lastUpdated = user.last_updated,
timeZone = timeZone,
note = generateNoteUserQRCode(user)
)
}
from custom-qr-generator.
It's weird, cause zxing encoder takes only result of .encode()
(no difference which QrData you pass, internal or custom). And charset is not linked to any of QrData:
Mb ios phonebook is not ready for vcard v4 :). Did you try UTF-16?
from custom-qr-generator.
oh, its work in that website (utf 8), Why i used your base Vcard its show normally but mine
from custom-qr-generator.
Related Issues (20)
- live app example HOT 2
- 4th ball visibility HOT 6
- Logo from url HOT 2
- Version 1.5.8 setFourthEyeEnabled() method ambiguous call in Java HOT 2
- QrVectorLogo is not correctly scaled with non whole size HOT 2
- Need option for Padding/Margin for QrVectorBackground Image HOT 6
- Logo seems not cropped properly HOT 5
- Highlight anchor elements for better recognition
- Need option to make all eyes different colours HOT 3
- QrVectorLogo is not correctly showed HOT 2
- java.lang.IllegalArgumentException: width and height must be > 0 HOT 6
- com.google.zxing.WriterException HOT 5
- Documentation unclear about features HOT 7
- Add QrVectorPixelShape.Square(size) shape modifier HOT 3
- How to use your library draw QR codes with 3 vertices and circles? Looking forward to your reply HOT 5
- Support the different standard encodings HOT 7
- Expose reserved areas HOT 15
- Customizing QR code after generation HOT 4
- Is the size of the positioning markings adjustable? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom-qr-generator.