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
getActiveUser()
Gets the currently active uservoid
identifyUser(User user)
Identify a Connect user.void
init(Context context, java.lang.String apiKey)
Initialise Connect SDKboolean
isEnabled()
Gets whether or not the Connect SDK is allowed to make network requests.void
logout()
Logs the currently active user out of the SDK by clearing their identity from local storage and disabling push notifications.BaseQueue<java.lang.String>
outboundQueue()
Temporarily exposing a queue for the Outbound SDK to use.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(Context context, java.lang.String apiKey)
Initialise Connect SDK
- Parameters:
context
- an application context
-
isEnabled
public boolean isEnabled()
Gets whether or not the Connect SDK is allowed to make network requests. Will also return false if the Connect SDK has not been initialised. If no config has been stored yet then we assume we are enabled until a config requests confirms otherwise.
- Returns:
- true if network requests are enabled, false otherwise.
-
outboundQueue
public BaseQueue<java.lang.String> outboundQueue()
Temporarily exposing a queue for the Outbound SDK to use. Will be restricted once the Outbound SDK is removed from the project.
-
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.
-
logout
public void logout()
Logs the currently active user out of the SDK by clearing their identity from local storage and disabling push notifications.
-
-