public class Customerly
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Customerly.Callback |
class |
Customerly.RegisterUserTask |
class |
Customerly.SetAttributesTask |
class |
Customerly.SetCompanyTask |
static interface |
Customerly.Task |
class |
Customerly.UpdateTask |
Modifier and Type | Method and Description |
---|---|
static void |
configure(android.app.Application pApplication,
java.lang.String pCustomerlyAppID)
Call this method to configure the SDK indicating the Customerly App ID before accessing it.
|
static void |
configure(android.app.Application pApplication,
java.lang.String pCustomerlyAppID,
int pWidgetColor)
Call this method to configure the SDK indicating the Customerly App ID before accessing it.
|
static Customerly |
get()
Call this method to obtain the reference to the Customerly SDK
|
void |
logoutUser()
Call this method to close the user's Customerly session.
|
void |
openSupport(android.app.Activity activity)
Call this method to open the Support Activity.
|
Customerly.RegisterUserTask |
registerUser(java.lang.String email)
Call this method to link your app user to the Customerly session.
|
Customerly.SetAttributesTask |
setAttributes(java.util.HashMap<java.lang.String,java.lang.Object> pAttributes)
Call this method to add new custom attributes to the user.
|
Customerly.SetCompanyTask |
setCompany(java.util.HashMap<java.lang.String,java.lang.Object> pCompany)
Call this method to add company attributes to the user.
|
void |
setVerboseLogging(boolean pVerboseLogging)
Call this method to enable error logging in the Console.
|
void |
trackEvent(java.lang.String pEventName)
Call this method to keep track of custom labelled events.
|
Customerly.UpdateTask |
update() |
@NonNull public static Customerly get()
public static void configure(@NonNull android.app.Application pApplication, @NonNull java.lang.String pCustomerlyAppID)
Application.onCreate()
pApplication
- The application class referencepCustomerlyAppID
- The Customerly App ID found in your Customerly consolepublic static void configure(@NonNull android.app.Application pApplication, @NonNull java.lang.String pCustomerlyAppID, int pWidgetColor)
Application.onCreate()
pCustomerlyAppID
- The Customerly App ID found in your Customerly consolepWidgetColor
- The custom widget_color. If Color.TRANSPARENT, it will be ignoredpublic void setVerboseLogging(boolean pVerboseLogging)
pVerboseLogging
- true for enable logging, please pass your.application.package.BuildConfig.DEBUG@CheckResult @NonNull public Customerly.UpdateTask update()
@CheckResult @NonNull public Customerly.RegisterUserTask registerUser(@NonNull java.lang.String email)
Customerly.RegisterUserTask
that has to be started with his method Customerly.__Task.start()
configure(Application,String)
email
- The mail address of the user@CheckResult @NonNull public Customerly.SetAttributesTask setAttributes(@NonNull java.util.HashMap<java.lang.String,java.lang.Object> pAttributes) throws java.lang.IllegalArgumentException
configure(Application,String)
pAttributes
- Optional attributes for the user. Can contain only String, char, int, long, float or double valuesjava.lang.IllegalArgumentException
- is thrown if the attributes check fails@CheckResult @NonNull public Customerly.SetCompanyTask setCompany(@NonNull java.util.HashMap<java.lang.String,java.lang.Object> pCompany) throws java.lang.IllegalArgumentException
configure(Application,String)
pCompany
- Optional company for the user. The map must contain a String value with key "company_id" containing to the Company ID and a String value with key "name" containing the Company namejava.lang.IllegalArgumentException
- is thrown if company map check failspublic void openSupport(@NonNull android.app.Activity activity)
configure(Application,String)
activity
- The current activitypublic void logoutUser()
configure(Application,String)
public void trackEvent(@NonNull java.lang.String pEventName)
configure(Application,String)
pEventName
- The event custom label