What's new? | Help | Directory | Sign in
Google
contactlistimporter
Contact list importer that provides an abstract interface for importing contacts from various services like MSN Hotmail, Yahoo, GMail etc.
  
  
  
    
Join project
Project owners:
  tjerkw
Project members:
cristian.ventura

Contact List Importer 1.0 Java Library

Introduction

Importing contacts from various services is not easy. The ContactListImporter provides an interface for retrieving contacts from various services. Two working implementations of that interface are provided for the following services.

Please Donate

If you are using this project I have saved you either

So be kind a please donate. Any amount will do. I am a student so i can really use the money.

Click to Donate

Sample Code

Importing contacts from these services very easy with the ContactListImporter library. The following code imports all contacts and prints them to System.out:

import com.xdatasystem.contactlistimporter.*;

// automatically guess the correct implementaion based on the email address
ContactListImporter importer=ContactListImporterFactory.guess("someuser@hotmail.com", "password");
List<Contact> contacts=importer.getContactList();
for(Contact c : contacts) {
  System.out.println("name: "+c.getName()+", email: "+c.getEmail());
}

Other ways to instantiate a ContactListImpoter using the factory can be done as follows:

// creates an hotmail contact importer
importer=ContactListImporterFactory.hotmail("someuser@hotmail.com", "password");
// creates an gmail contact importer
importer=ContactListImporterFactory.gmail("someuser@gmail.com", "password");

Dependencies

This library has the following depenencies:

This library can be used to support a -invite-your-friends- function for your site.

This library builds upon the knowledge gathered by the creator of the following ruby contactsimporter library:

http://rufy.com/contacts/doc/

Author

This program was created by Tjerk Wolterink and donated to the open source community. Cristian Ventura added the Yahoo importer implementation. You are free to add more importers, or to fix bugs.. just give me a mail.