public class

Contact

extends AirshipComponent
java.lang.Object
   ↳ com.urbanairship.AirshipComponent
     ↳ com.urbanairship.contacts.Contact

Class Overview

Airship contact. A contact is distinct from a channel and represents a "user" within Airship. Contacts may be named and have channels associated with it.

Summary

Public Constructors
Contact(Context context, PreferenceDataStore preferenceDataStore, AirshipRuntimeConfig runtimeConfig, PrivacyManager privacyManager, AirshipChannel airshipChannel)
Creates a Contact.
Public Methods
AttributeEditor editAttributes()
Edit the attributes associated with this Contact.
TagGroupsEditor editTagGroups()
Edit the tags associated with this Contact.
String getNamedUserId()
Gets the named user ID.
void identify(String externalId)
Associates the contact with the given named user identifier.
void reset()
Disassociate the channel from its current contact, and create a new un-named contact.
void setContactConflictListener(ContactConflictListener listener)
Protected Methods
void init()
Initialize the manager.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Contact (Context context, PreferenceDataStore preferenceDataStore, AirshipRuntimeConfig runtimeConfig, PrivacyManager privacyManager, AirshipChannel airshipChannel)

Creates a Contact.

Parameters
context The application context.
preferenceDataStore The preferences data store.

Public Methods

public AttributeEditor editAttributes ()

Edit the attributes associated with this Contact.

Returns

public TagGroupsEditor editTagGroups ()

Edit the tags associated with this Contact.

Returns

public String getNamedUserId ()

Gets the named user ID.

Returns
  • The named user ID, or null if it is unknown.

public void identify (String externalId)

Associates the contact with the given named user identifier.

Parameters
externalId The channel's identifier.

public void reset ()

Disassociate the channel from its current contact, and create a new un-named contact.

public void setContactConflictListener (ContactConflictListener listener)

Protected Methods

protected void init ()

Initialize the manager. Called in UAirship during takeoff.