public class

NamedUser

extends AirshipComponent
java.lang.Object
   ↳ com.urbanairship.AirshipComponent
     ↳ com.urbanairship.push.NamedUser

Class Overview

The named user is an alternate method of identifying the device. Once a named user is associated to the device, it can be used to send push notifications to the device.

Summary

Public Constructors
NamedUser(Context context, PreferenceDataStore preferenceDataStore)
Creates a NamedUser.
Public Methods
TagGroupsEditor editTagGroups()
Edit the named user tags.
void forceUpdate()
Forces a named user update.
String getId()
Returns the named user ID.
void setId(String namedUserId)
Sets the named user ID.
Protected Methods
void init()
Initialize the manager.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public NamedUser (Context context, PreferenceDataStore preferenceDataStore)

Creates a NamedUser.

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

Public Methods

public TagGroupsEditor editTagGroups ()

Edit the named user tags.

Returns
  • The TagGroupsEditor.

public void forceUpdate ()

Forces a named user update.

public String getId ()

Returns the named user ID.

Returns
  • The named user ID as a string or null if it does not exist.

public void setId (String namedUserId)

Sets the named user ID.

To associate the named user ID, its length must be greater than 0 and less than 129 characters. To disassociate the named user ID, its value must be null.

Parameters
namedUserId The named user ID string.

Protected Methods

protected void init ()

Initialize the manager. Called in UAirship during takeoff.