Android Open Source - wiki-contacts-android Contact






From Project

Back to project page wiki-contacts-android.

License

The source code is released under:

Apache License

If you think the Android project wiki-contacts-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.kahkong.wikicontacts.modal;
//w  w w.  jav a2 s .c om
import android.os.Parcel;
import android.os.Parcelable;

/**
 * 
 * @author Poh Kah Kong
 *
 */
public class Contact implements Parcelable {
  // default value when empty
  // string: null
  // string[]: null
  // int: -1
  // boolean: false
  
  // sample value when not empty
  // string: "abc"
  // string[]: {"abc", "efg"}
  // int: 1
  // boolean: true
  
  protected int id = -1;
  protected String name = null;
  protected String[] tags = null;
  protected String countryCode = null;
  protected String[] number = null;
  protected boolean spam = false;
  protected String description = null;
  protected String[] email = null;
  protected String address= null;
  protected String website = null;
  protected String imageUrl = null;
  
  public int getId() {
    return id;
  }
  
  public void setId(int id) {
    this.id = id;
  }
  
  public String getName() {
    return name;
  }
  
  public void setName(String name) {
    this.name = name;
  }
  
  public String[] getTags() {
    return tags;
  }

  public void setTags(String[] tags) {
    this.tags = tags;
  }

  public String getCountryCode() {
    return countryCode;
  }
  
  public void setCountryCode(String countryCode) {
    this.countryCode = countryCode;
  }
  
  public String[] getNumber() {
    return number;
  }
  
  public void setNumber(String[] number) {
    this.number = number;
  }
  
  public boolean isSpam() {
    return spam;
  }

  public void setSpam(boolean spam) {
    this.spam = spam;
  }

  public String getDescription() {
    return description;
  }
  
  public void setDescription(String description) {
    this.description = description;
  }
  
  public String[] getEmail() {
    return email;
  }
  
  public void setEmail(String[] email) {
    this.email = email;
  }
  
  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }
  
  public String getWebsite() {
    return website;
  }
  
  public void setWebsite(String website) {
    this.website = website;
  }

  public String getImageUrl() {
    return imageUrl;
  }

  public void setImageUrl(String imageUrl) {
    this.imageUrl = imageUrl;
  }

  @Override
  public int describeContents() {
    return 0;
  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(id);
    dest.writeString(name);
    dest.writeString(countryCode);
    dest.writeStringArray(number);
    dest.writeStringArray(email);
    dest.writeInt(spam?1:0);
    dest.writeString(description);
    dest.writeStringArray(tags);
    dest.writeString(address);
    dest.writeString(website);
    dest.writeString(imageUrl);    
  }
  
  public static final Parcelable.Creator<Contact> CREATOR = new Parcelable.Creator<Contact>() { 
    @Override
    public Contact[] newArray(int size) {
      return null;
    }

    @Override
    public Contact createFromParcel(Parcel source) {
      Contact contact = new Contact();
      contact.id = source.readInt();
      contact.name = source.readString();
      contact.countryCode = source.readString();
      contact.number = source.createStringArray();
      contact.email = source.createStringArray();
      contact.spam = source.readInt()==1 ? true:false;
      contact.description = source.readString();
      contact.tags = source.createStringArray();
      contact.address = source.readString();
      contact.website = source.readString();
      contact.imageUrl = source.readString();
      return contact;
    }  
  };  
}




Java Source Code List

com.kahkong.wikicontacts.callback.OnChangeListener.java
com.kahkong.wikicontacts.callback.OnClickListener.java
com.kahkong.wikicontacts.callback.OnCompleteListener.java
com.kahkong.wikicontacts.callback.OnEventListener.java
com.kahkong.wikicontacts.callback.OnTimeOutListener.java
com.kahkong.wikicontacts.callback.Validator.java
com.kahkong.wikicontacts.controller.AddEditContactActivity.java
com.kahkong.wikicontacts.controller.CallDetectService.java
com.kahkong.wikicontacts.controller.EditContactActivity.java
com.kahkong.wikicontacts.controller.SearchActivity.java
com.kahkong.wikicontacts.controller.TestActivity.java
com.kahkong.wikicontacts.controller.UpdateEditContactActivity.java
com.kahkong.wikicontacts.form.EditTextForm.java
com.kahkong.wikicontacts.form.ImageUploadForm.java
com.kahkong.wikicontacts.form.MultiEditTextForm.java
com.kahkong.wikicontacts.form.OptionsForm.java
com.kahkong.wikicontacts.form.RadioGroupForm.java
com.kahkong.wikicontacts.form.SpinnerForm.java
com.kahkong.wikicontacts.form.TagsForm.java
com.kahkong.wikicontacts.link.EmailLink.java
com.kahkong.wikicontacts.link.Link.java
com.kahkong.wikicontacts.link.NumberLink.java
com.kahkong.wikicontacts.link.TagLink.java
com.kahkong.wikicontacts.link.UrlLink.java
com.kahkong.wikicontacts.modal.ContactAndImage.java
com.kahkong.wikicontacts.modal.Contact.java
com.kahkong.wikicontacts.modal.CountryCode.java
com.kahkong.wikicontacts.modal.CountryCodesWithSelect.java
com.kahkong.wikicontacts.service.ContactServiceImpl.java
com.kahkong.wikicontacts.service.ContactService.java
com.kahkong.wikicontacts.service.CountryCodeServiceImpl.java
com.kahkong.wikicontacts.service.CountryCodeService.java
com.kahkong.wikicontacts.service.ImageServiceImpl.java
com.kahkong.wikicontacts.service.ImageService.java
com.kahkong.wikicontacts.service.IntentServiceImpl.java
com.kahkong.wikicontacts.service.IntentService.java
com.kahkong.wikicontacts.service.NotificationServiceImpl.java
com.kahkong.wikicontacts.service.NotificationService.java
com.kahkong.wikicontacts.service.PhoneBookServiceImpl.java
com.kahkong.wikicontacts.service.PhoneBookService.java
com.kahkong.wikicontacts.service.PreferencesServiceImpl.java
com.kahkong.wikicontacts.service.PreferencesService.java
com.kahkong.wikicontacts.service.ResourceServiceImpl.java
com.kahkong.wikicontacts.service.ResourceService.java
com.kahkong.wikicontacts.service.ValidationServiceImpl.java
com.kahkong.wikicontacts.service.ValidationService.java
com.kahkong.wikicontacts.service.WebServiceImpl.java
com.kahkong.wikicontacts.service.WebService.java
com.kahkong.wikicontacts.subcontroller.CallStateListener.java
com.kahkong.wikicontacts.subcontroller.FlowLayout.java
com.kahkong.wikicontacts.subcontroller.IncomingContactLayout.java
com.kahkong.wikicontacts.subcontroller.InfoDialog.java
com.kahkong.wikicontacts.subcontroller.LoadingDialog.java
com.kahkong.wikicontacts.subcontroller.ResultAdaptor.java
com.kahkong.wikicontacts.subcontroller.ViewContactDialog.java
com.kahkong.wikicontacts.subcontroller.ViewFormatter.java