RurioLuca / QrCardParsing

Android Libraries to parsing and generate MeCardContent
MIT License
263 stars 36 forks source link

Showing no Emails and Phone Numbers #4

Closed Bludyvenom closed 6 years ago

Bludyvenom commented 6 years ago

I'm trying to use it with a scanned barcode's value instead of generating one and I'm getting rawValue of that barcode and parsing it with your library's vCard but it isn't showing the Email and Phone Numbers and just providing null as the value.

Here's the code I'm using:

    VCard vCard = VCardParser.parse(message);
    String email;
    String text = vCard.getFormattedName();
    vCard.setNote("\nScanned!!!");
    if(vCard.getTelephones().size() != 0){
        StringBuilder textBuilder = new StringBuilder(text);
        for (int i = 0; i<vCard.getTelephones().size(); i++) {
            email = vCard.getTelephones().get(i);
            textBuilder.append("\n").append(email);
        }
        text = textBuilder.toString();
    }
    if(vCard.getEmails().size() != 0){
        StringBuilder textBuilder = new StringBuilder(text);
        for (int i = 0; i<vCard.getEmails().size(); i++) {
            email = vCard.getEmails().get(i);
            textBuilder.append("\n").append(email);
        }
        text = textBuilder.toString();
    }
    text = text + vCard.getNote()+"\n\n\n"+message;
    textView.setText(text);

and here's the output: img_20180225_135435

The output above is also showing the actual message after displaying the vCard's values.

RurioLuca commented 6 years ago

thanks for the report I check as soon as possible. Luca

RurioLuca commented 6 years ago

the sample application works correctly, can you send me the contents of the Qr code you are trying to scan?

Bludyvenom commented 6 years ago

Sorry to say but because of your so late reply and no solution after trying whatsoever, I'm not using this library anymore but as in the screenshot above, You can see the content starting from "BEGIN".

RurioLuca commented 6 years ago

sorry I only saw the opening of the issue today, git hub has not notified me ..

RurioLuca commented 6 years ago

I close the issue, possibly open another one or send me an email.

Luca