Enum Connect
- java.lang.Object
-
- java.lang.Enum<Connect>
-
- com.zendesk.connect.Connect
-
-
Enum Constant Summary
Enum Constants Enum Constant and Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
disablePush()
Disables push notifications for the currently active user.User
getUser()
Gets the currently active uservoid
identifyUser(User user)
Identify a Connect user.void
init(Application application, java.lang.String privateKey)
Initialise Connect SDKvoid
logoutUser()
Logs the currently active user out of the SDK by clearing their identity from local storage and disabling push notifications.void
registerForPush()
Registers the currently active user for push notifications.void
trackEvent(Event event)
Track a Connect event.static Connect
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Connect[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final Connect INSTANCE
-
-
Method Detail
-
values
public static Connect[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Connect c : Connect.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Connect valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
init
public void init(Application application, java.lang.String privateKey)
Initialise Connect SDK
- Parameters:
application
- an instance ofApplication
privateKey
- a Connect private API key
-
identifyUser
public void identifyUser(User user)
Identify a Connect user. Use
UserBuilder
to construct aUser
object with all of the details required. For an anonymous user you can useUserBuilder.anonymousUser()
.Identify should be called when a user needs to be remembered, or the existing information for a user needs to be updated.
- Parameters:
user
- theUser
to be identified
-
trackEvent
public void trackEvent(Event event)
Track a Connect event. Use
EventFactory
to quickly createEvent
objects.Track should be called whenever something important happens that you want to monitor in your Connect dashboard.
- Parameters:
event
- theEvent
to be tracked
-
registerForPush
public void registerForPush()
Registers the currently active user for push notifications.
-
disablePush
public void disablePush()
Disables push notifications for the currently active user.
-
logoutUser
public void logoutUser()
Logs the currently active user out of the SDK by clearing their identity from local storage and disabling push notifications.
-
-