java.lang.Object | ||
↳ | com.urbanairship.AirshipComponent | |
↳ | com.urbanairship.contacts.Contact |
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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Contact(Context context, PreferenceDataStore preferenceDataStore, AirshipRuntimeConfig runtimeConfig, PrivacyManager privacyManager, AirshipChannel airshipChannel)
Creates a Contact.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
associateChannel(String channelId, ChannelType channelType)
Associates a channel to the contact.
| ||||||||||
AttributeEditor |
editAttributes()
Edit the attributes associated with this Contact.
| ||||||||||
ScopedSubscriptionListEditor |
editSubscriptionLists()
Edits the subscription lists associated with this Contact.
| ||||||||||
TagGroupsEditor |
editTagGroups()
Edit the tags associated with this Contact.
| ||||||||||
String |
getNamedUserId()
Gets the named user ID.
| ||||||||||
PendingResult<Map<String, Set<Scope>>> |
getSubscriptionLists()
Returns the current set of subscription lists for the current contact.
| ||||||||||
PendingResult<Map<String, Set<Scope>>> |
getSubscriptionLists(boolean includePendingUpdates)
Returns the current set of subscription lists for the current contact, optionally applying pending
subscription list changes that will be applied during the next contact update.
| ||||||||||
void |
identify(String externalId)
Associates the contact with the given named user identifier.
| ||||||||||
void |
registerEmail(String address, EmailRegistrationOptions options)
Registers an Email channel.
| ||||||||||
void |
registerOpenChannel(String address, OpenChannelRegistrationOptions options)
Registers an Open channel.
| ||||||||||
void |
registerSms(String msisdn, SmsRegistrationOptions options)
Registers a Sms channel.
| ||||||||||
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a Contact.
context | The application context. |
---|---|
preferenceDataStore | The preferences data store. |
Associates a channel to the contact.
channelId | The channel Id. |
---|---|
channelType | The channel type. |
Edit the attributes associated with this Contact.
AttributeEditor
.
Edits the subscription lists associated with this Contact.
Gets the named user ID.
Returns the current set of subscription lists for the current contact.
An empty set indicates that this contact is not subscribed to any lists.
PendingResult
of the current set of subscription lists.
Returns the current set of subscription lists for the current contact, optionally applying pending subscription list changes that will be applied during the next contact update.
An empty set indicates that this contact is not subscribed to any lists.
includePendingUpdates | `true` to apply pending updates to the returned set, `false` to return the set without pending updates. |
---|
PendingResult
of the current set of subscription lists.
Associates the contact with the given named user identifier.
externalId | The channel's identifier. |
---|
Registers an Email channel.
address | The Email address to register. |
---|---|
options | An EmailRegistrationOptions object that defines registration options. |
Registers an Open channel.
address | The address to register. |
---|---|
options | An SmsRegistrationObject object that defines registration options. |
Registers a Sms channel.
msisdn | The Mobile Station number to register. |
---|---|
options | An SmsRegistrationObject object that defines registration options. |
Disassociate the channel from its current contact, and create a new un-named contact.