Android Open Source - android.bigredsnapshot User Profile






From Project

Back to project page android.bigredsnapshot.

License

The source code is released under:

MIT License

If you think the Android project android.bigredsnapshot 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 io.evercam.bigredsnapshot.account;
//ww  w.  jav a2  s.c o m
import java.util.ArrayList;
import java.util.List;

import android.net.Uri;

public class UserProfile
{
  /**
   * Adds an email address to the list of possible email addresses for the
   * user
   * 
   * @param email
   *            the possible email address
   */
  public void addPossibleEmail(String email)
  {
    addPossibleEmail(email, false);
  }

  /**
   * Adds an email address to the list of possible email addresses for the
   * user. Retains information about whether this email address is the primary
   * email address of the user.
   * 
   * @param email
   *            the possible email address
   * @param is_primary
   *            whether the email address is the primary email address
   */
  public void addPossibleEmail(String email, boolean is_primary)
  {
    if (email == null) return;
    if (is_primary)
    {
      _primary_email = email;
      _possible_emails.add(email);
    }
    else _possible_emails.add(email);
  }

  /**
   * Adds a name to the list of possible names for the user.
   * 
   * @param name
   *            the possible name
   */
  public void addPossibleName(String name)
  {
    if (name != null) _possible_names.add(name);
  }

  /**
   * Adds a phone number to the list of possible phone numbers for the user.
   * 
   * @param phone_number
   *            the possible phone number
   */
  public void addPossiblePhoneNumber(String phone_number)
  {
    if (phone_number != null) _possible_phone_numbers.add(phone_number);
  }

  /**
   * Adds a phone number to the list of possible phone numbers for the user.
   * Retains information about whether this phone number is the primary phone
   * number of the user.
   * 
   * @param phone_number
   *            the possible phone number
   * @param is_primary
   *            whether the phone number is teh primary phone number
   */
  public void addPossiblePhoneNumber(String phone_number, boolean is_primary)
  {
    if (phone_number == null) return;
    if (is_primary)
    {
      _primary_phone_number = phone_number;
      _possible_phone_numbers.add(phone_number);
    }
    else _possible_phone_numbers.add(phone_number);
  }

  /**
   * Sets the possible photo for the user.
   * 
   * @param photo
   *            the possible photo
   */
  public void addPossiblePhoto(Uri photo)
  {
    if (photo != null) _possible_photo = photo;
  }

  /**
   * Retrieves the list of possible email addresses.
   * 
   * @return the list of possible email addresses
   */
  public List<String> possibleEmails()
  {
    return _possible_emails;
  }

  /**
   * Retrieves the list of possible names.
   * 
   * @return the list of possible names
   */
  public List<String> possibleNames()
  {
    return _possible_names;
  }

  /**
   * Retrieves the list of possible phone numbers
   * 
   * @return the list of possible phone numbers
   */
  public List<String> possiblePhoneNumbers()
  {
    return _possible_phone_numbers;
  }

  /**
   * Retrieves the possible photo.
   * 
   * @return the possible photo
   */
  public Uri possiblePhoto()
  {
    return _possible_photo;
  }

  /**
   * Retrieves the primary email address.
   * 
   * @return the primary email address
   */
  public String primaryEmail()
  {
    return _primary_email;
  }

  /**
   * Retrieves the primary phone number
   * 
   * @return the primary phone number
   */
  public String primaryPhoneNumber()
  {
    return _primary_phone_number;
  }

  /** The primary email address */
  private String _primary_email;
  /** The primary name */
  private String _primary_name;
  /** The primary phone number */
  private String _primary_phone_number;
  /** A list of possible email addresses for the user */
  private List<String> _possible_emails = new ArrayList<String>();
  /** A list of possible names for the user */
  private List<String> _possible_names = new ArrayList<String>();
  /** A list of possible phone numbers for the user */
  private List<String> _possible_phone_numbers = new ArrayList<String>();
  /** A possible photo for the user */
  private Uri _possible_photo;
}




Java Source Code List

io.evercam.bigredsnapshot.BigButtonActivity.java
io.evercam.bigredsnapshot.BigRedSnapshot.java
io.evercam.bigredsnapshot.ChooseCameraActivity.java
io.evercam.bigredsnapshot.LoginActivity.java
io.evercam.bigredsnapshot.SignUpActivity.java
io.evercam.bigredsnapshot.SlideActivity.java
io.evercam.bigredsnapshot.SnapshotRequest.java
io.evercam.bigredsnapshot.UrlStatus.java
io.evercam.bigredsnapshot.account.AccountUtils.java
io.evercam.bigredsnapshot.account.ProfileQuery.java
io.evercam.bigredsnapshot.account.UserProfile.java
io.evercam.bigredsnapshot.helper.CustomedDialog.java
io.evercam.bigredsnapshot.helper.PrefsManager.java
io.evercam.bigredsnapshot.helper.PropertyReader.java
io.evercam.bigredsnapshot.tasks.CaptureSnapshotTask.java
io.evercam.bigredsnapshot.tasks.CheckInternetTask.java