Ronakpatel005 / android-vcard

Automatically exported from code.google.com/p/android-vcard
Apache License 2.0
0 stars 0 forks source link

ContactStruct.addExtension will be ignored in VCardComposer #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
ArrayList<String> list = new ArrayList<String>();
list.add("1985-01-24");
contact.addExtension(new PropertyNode("BDAY", "1985-01-24", list, null, null, 
null, null));
composer.createVCard(contact, VCardComposer.VERSION_VCARD30_INT);

What is the expected output? What do you see instead?
Expected: BDAY:1985-01-24
Instead: (nothing)

What version of the product are you using? On what operating system?
android-vcard 1.3, Android

Please provide any additional information below.
the extensionMap in ContactStruct is only filled in addExtension but never read 
at all.

Fix:
Well I just hacked a really simple solution for my projekt like this in 
VCardComposer:
        if (struct.extensionMap != null) {
            for (java.util.Map.Entry<String, List<String>> entry : struct.extensionMap.entrySet()) {
                String name = entry.getKey();
                for (String value : entry.getValue()) {
                    value = PropertyNode.decode(value).propValue;
                    mResult.append(name + ":").append(foldingString(value, vcardversion))
                            .append(mNewline);
                }
            }
        }

this above part goes in the function createVCard at the bottom before 
mResult.append("END:VCARD").append(mNewline);

Original issue reported on code.google.com by patrickb...@gmail.com on 26 May 2011 at 2:20

GoogleCodeExporter commented 9 years ago
See my comment in issue #8.

Original comment by kamil.paral on 27 May 2011 at 6:46

GoogleCodeExporter commented 9 years ago
I met the same problem, could you tell me how to solve

Original comment by chenwj...@gmail.com on 24 Oct 2013 at 6:06

GoogleCodeExporter commented 9 years ago
Hello,
I use the jar version is android-vcard 1.4,and the development system version 
is android4.2.2

Original comment by chenwj...@gmail.com on 24 Oct 2013 at 6:22

GoogleCodeExporter commented 9 years ago
You can consider this project dead. See the bold text on project home page. If 
it works for you, great, if it doesn't, sorry.

Original comment by kamil.paral on 24 Oct 2013 at 8:25

GoogleCodeExporter commented 9 years ago
At present the latest version of the android - vcard.jar package is 1.4 , and 
is used in android4.2.2 theoretically it should be possible,right?

Original comment by chenwj...@gmail.com on 24 Oct 2013 at 8:43

GoogleCodeExporter commented 9 years ago
This library is not intended to be used on Android. It's for PC use. Read the 
home page.

Original comment by kamil.paral on 24 Oct 2013 at 9:30

GoogleCodeExporter commented 9 years ago
Oh, I'm sorry, I didn't pay attention to this. But I see someone on android 
applications for this library。
If I want to achieve this function on android, can you help me?

Original comment by chenwj...@gmail.com on 25 Oct 2013 at 1:28