Unable to get the email address from Vcard

23 views
Skip to first unread message

arun1...@gmail.com

unread,
Jun 26, 2014, 2:25:52 AM6/26/14
to ez-vcard...@googlegroups.com
Hi All,

There are inbuilt functions in getting the structuredname and formattedname. But for email there is no such method. I am using a maven project and i have added the dependency in the POM.xml.

<dependency>
<groupId>com.googlecode.ez-vcard</groupId>
<artifactId>ez-vcard</artifactId>
<version>0.9.4</version>
</dependency>

vcard.getFormattedName().getValue() is working fine and fetching the name.
vcard.getEmail().getValue() is not working. Is there any library I am missing? or what is the method to fetch all the details from vcard.

Thanks
Arun

Michael Angstadt

unread,
Jun 26, 2014, 7:52:39 AM6/26/14
to ez-vcard...@googlegroups.com
Hi Arun,

Use the "getEmails()" method to retrieve a vCard's email addresses.  Because a vCard can contain multiple emails addresses, this method returns a List.  So, to get the value of the first email address, you would type something like this:

vcard.getEmails().get(0).getValue()

Thanks for using ez-vcard!

-Mike
--
You received this message because you are subscribed to the Google Groups "ez-vcard-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ez-vcard-discu...@googlegroups.com.
To post to this group, send email to ez-vcard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ez-vcard-discuss/f2a48308-88ff-4e92-89c4-128777175879%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Mike Angstadt
Assistant Electronic Resources Librarian, Computer Lab
Montgomery County-Norristown Public Library
1001 Powell Street, Norristown, PA, 19401

Any views or opinions expressed in this e-mail are those of the sender and not necessarily coincide with those of the organization.The information in this email is confidential. The contents may not be disclosed or used by anyone other than the addressee. If you are not the intended recipient, please notify us immediately at the above address.

Arun Raja

unread,
Jun 26, 2014, 9:16:54 PM6/26/14
to ez-vcard...@googlegroups.com
Hi Mike,

List<Email> emails= vcard.getEmails();
I am using this to get the emails from vcard but still I get the property value but I am not able to get the email details. Please can you send me the full code to retrieve all the mail id's from the vcard. I am using version 4 of vcard.

Thanks,
Arun


You received this message because you are subscribed to a topic in the Google Groups "ez-vcard-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ez-vcard-discuss/fkgpUHGdXkI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ez-vcard-discu...@googlegroups.com.

To post to this group, send email to ez-vcard...@googlegroups.com.

Arun Raja

unread,
Jun 26, 2014, 10:02:49 PM6/26/14
to ez-vcard-discuss, mike.a...@gmail.com
Hi Mike,

Thanks for the solution it started working when I used it this way. Can these details be included in the tutorial page as these details are not mentioned anywhere. There is also no clear details on how to fetch the phone numbers, title etc as these values are not set and are added into the vcard.


This page has the fetching details of only some of the properties. It would be really helpful for all the developers if an example of fetching all the details can be mentioned here.

Thanks
Arun 


On Thu, Jun 26, 2014 at 7:52 PM, Michael Angstadt <mike.a...@gmail.com> wrote:
You received this message because you are subscribed to a topic in the Google Groups "ez-vcard-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ez-vcard-discuss/fkgpUHGdXkI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ez-vcard-discu...@googlegroups.com.

To post to this group, send email to ez-vcard...@googlegroups.com.

Michael Angstadt

unread,
Jun 27, 2014, 3:12:28 PM6/27/14
to ez-vcard...@googlegroups.com
Can you be more specific?  What kind of details are you looking for?  Also, please post your questions here before submitting any new Issues.  Thanks. :)
To view this discussion on the web visit https://groups.google.com/d/msgid/ez-vcard-discuss/CAAs62TQ9CS%2BGz6SQ-3OpW7KAy8cAtmj2rQBR_asKa5CqO1gcpg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages