mangstadt / ez-vcard-android

Maps the Android vCard API to the ez-vcard API.
BSD 3-Clause "New" or "Revised" License
29 stars 7 forks source link

ez-vcard-android

Maps the Android vCard API to the ez-vcard API.

Converts an ez-vcard VCard object into the appropriate Android data fields, so it can be added to an Android user's contact list.

Code Sample

File vcardFile = ...
VCardReader reader = null;
try {
  reader = new VCardReader(vcardFile);
  reader.registerScribe(new AndroidCustomFieldScribe());

  ContactOperations operations = new ContactOperations(getApplicationContext());
  VCard vcard = null;
  while ((vcard = reader.readNext()) != null) {
      operations.insertContact(vcard);
  }
} finally {
  reader.close();
}

Download

A downloadable JAR file does not exist yet. You can either build the project yourself, or copy and paste the code into your project (please leave the copyright notice in the source code if you choose the latter option).

Development Environment Setup Instructions

If you are not using an Android-enabled IDE, follow these instructions so you can get the project to a point where you can build it.