public class ForeSee
extends ForeSeeBase
Modifier and Type | Class and Description |
---|---|
static interface |
ForeSee.ForeSeeSDKConfigurationListener
Listener to notify on completion or failure of the configuration process
|
Constructor and Description |
---|
ForeSee() |
Modifier and Type | Method and Description |
---|---|
static void |
activityPaused(android.app.Activity activity)
Deprecated.
This method was deprecated in version 3.4.3
|
static void |
activityResumed(android.app.Activity activity)
Deprecated.
This method was deprecated in version 3.4.3
|
static void |
activityStarted(android.app.Activity activity)
Deprecated.
This method was deprecated in version 3.4.3
|
static void |
addCPPValue(java.lang.String key,
java.lang.String value)
Adds a CPP key/value pair.
|
static void |
appendCPPValue(java.lang.String key,
java.lang.String value)
Appends a value to a comma separated list stored against a custom CPP key.
|
static void |
checkIfEligibleForSurvey()
Check to see if the user is eligible for a survey.
|
static void |
customInviteAccepted()
Tells the SDK that a custom invite was accepted.
|
static void |
customInviteDeclined()
Tells the SDK that a custom invite was declined.
|
static java.util.Map<ContactType,java.lang.String> |
getAllContactDetails()
Check all contact details
|
static java.util.Map<java.lang.String,java.lang.String> |
getAllCPPs()
Gets all CPP key/value pairs
|
static java.lang.String |
getContactDetails()
Deprecated.
Check the preferred contact details stored in the SDK
|
static java.lang.String |
getContactDetails(ContactType contactType)
Check the contact details for the given contact type stored in the SDK
|
static java.lang.String |
getCPPValue(java.lang.String key)
Gets the CPP value associated to a given key
|
static ContactType |
getPreferredContactType()
Get the preferred contact type
|
static java.lang.String |
getVersion()
Gets the version of the SDK
|
static void |
incrementPageViews()
Manually increment the number of pages counted by the ForeSee SDK.
|
static void |
incrementSignificantEventCountWithKey(java.lang.String key)
Increment the significant event count for a given key.
|
static boolean |
isDebugLogEnabled()
Check whether debug logging is enabled
|
static void |
registerFragmentView(android.view.View fragmentView)
Deprecated.
This method was deprecated in version 4.1
|
static void |
removeCPPValue(java.lang.String key)
Removes a CPP value.
|
static void |
resetState()
Reset the state of the SDK.
|
static void |
setContactDetails(ContactType contactType,
java.lang.String contactDetails)
Add contact details for a particular type for use in the CONTACT notification method
|
static void |
setContactDetails(java.lang.String contactDetails)
Deprecated.
Add contact details for use in the CONTACT notification method
|
static void |
setCPPValueFromArray(java.lang.String key,
java.lang.String[] values)
Adds a CPP key/value pair.
|
static void |
setDebugLogEnabled(boolean debugLoggingEnabled)
Allows implementers to configure the SDK to produce more verbose logging output.
|
static void |
setInviteListener(BaseInviteListener inviteListener)
Set the invite listener
|
static void |
setPreferredContactType(ContactType contactType)
Set a preferred contact type
|
static void |
setSkipPoolingCheck(boolean skipPoolingCheck)
Allows implementers to configure the SDK to skip the pooling check.
|
boolean |
shouldSkipPoolingCheck()
Check if the pooling check is disabled
|
static void |
showInviteForSurveyID(java.lang.String surveyId)
Programmatically present the invitation for a given survey ID (sid)
|
static void |
showSurveyForSurveyID(java.lang.String surveyId)
Programmatically present the survey for a given survey ID (sid)
|
static void |
start(android.app.Application application)
Start the ForeSee SDK.
|
static void |
start(android.app.Application application,
ForeSee.ForeSeeSDKConfigurationListener listener)
Start the ForeSee SDK.
|
static void |
startWithConfiguration(android.app.Application application,
java.lang.String filename)
Starts the SDK using a custom configuration file
name.
|
static void |
startWithConfiguration(android.app.Application application,
java.lang.String filename,
ForeSee.ForeSeeSDKConfigurationListener listener)
Starts the SDK using a custom configuration file
name.
|
static void |
startWithConfigurationJSON(android.app.Application application,
java.lang.String configJSON)
Starts the SDK using a custom configuration JSON string.
|
static void |
startWithConfigurationJSON(android.app.Application application,
java.lang.String configJSON,
ForeSee.ForeSeeSDKConfigurationListener listener)
Starts the SDK using a custom configuration JSON string.
|
static Configuration |
updateConfig(android.app.Application application,
java.lang.String configJSON)
Updates the SDK with a custom configuration JSON string.
|
static Configuration |
useLocalConfig(android.app.Application application)
Updates the current persistenceSerializer to use a local configuration file.
|
public static void start(android.app.Application application)
application
- the Application contextpublic static void start(android.app.Application application, ForeSee.ForeSeeSDKConfigurationListener listener)
application
- the Application contextlistener
- callback which notifies when the SDK started or failed to startpublic static void startWithConfiguration(android.app.Application application, java.lang.String filename)
application
- the Application contextfilename
- configuration filenamepublic static void startWithConfiguration(android.app.Application application, java.lang.String filename, ForeSee.ForeSeeSDKConfigurationListener listener)
application
- the Application contextfilename
- configuration filenamelistener
- callback which notifies when the SDK started or failed to startpublic static void startWithConfigurationJSON(android.app.Application application, java.lang.String configJSON)
application
- the Application contextconfigJSON
- JSON string for configurationpublic static void startWithConfigurationJSON(android.app.Application application, java.lang.String configJSON, ForeSee.ForeSeeSDKConfigurationListener listener)
application
- the Application contextconfigJSON
- JSON string for configurationlistener
- callback which notifies when the SDK started or failed to startpublic static Configuration updateConfig(android.app.Application application, java.lang.String configJSON)
application
- the Application contextconfigJSON
- JSON string for configurationpublic static Configuration useLocalConfig(android.app.Application application)
application
- the Application contextpublic static void incrementSignificantEventCountWithKey(java.lang.String key)
key
- the key to increment the significant event count forpublic static void incrementPageViews()
@Deprecated public static void setContactDetails(java.lang.String contactDetails)
contactDetails
- An email address or mobile number to use. Format should be name@domain.com, 555-123-1234, 5551231234, etc.public static void setContactDetails(ContactType contactType, java.lang.String contactDetails)
contactType
- A particular contact typecontactDetails
- An email address or mobile number to use. Format should be name@domain.com, 555-123-1234, 5551231234, etc.public static void setPreferredContactType(ContactType contactType)
contactType
- A particular contact typepublic static void addCPPValue(java.lang.String key, java.lang.String value)
key
- the key to store the CPP undervalue
- the data to store in the CPPpublic static void removeCPPValue(java.lang.String key)
key
- the key of the CPP to removepublic static void setCPPValueFromArray(java.lang.String key, java.lang.String[] values)
key
- the key to store the CPP undervalues
- the value array to store in the CPPpublic static void appendCPPValue(java.lang.String key, java.lang.String value)
key
- the key to store the CPP undervalue
- the value to append to the CPPpublic static void setInviteListener(BaseInviteListener inviteListener)
inviteListener
- - Choose the listener based on your notification type
Options are: CustomExitSurveyInviteListener | CustomInSessionInviteListener | CustomContactInviteListener OR DefaultInviteListener if you are not customizing the invitation UIpublic static void customInviteAccepted()
public static void customInviteDeclined()
public static java.lang.String getVersion()
@Deprecated public static java.lang.String getContactDetails()
public static java.lang.String getContactDetails(ContactType contactType)
contactType
- A given contact typepublic static java.util.Map<ContactType,java.lang.String> getAllContactDetails()
public static ContactType getPreferredContactType()
public static java.lang.String getCPPValue(java.lang.String key)
key
- the key of the CPPpublic static java.util.Map<java.lang.String,java.lang.String> getAllCPPs()
public static void checkIfEligibleForSurvey()
public static void showInviteForSurveyID(java.lang.String surveyId)
surveyId
- the survey id to present the invitation for.public static void showSurveyForSurveyID(java.lang.String surveyId)
surveyId
- the survey id to present the survey for.public static void resetState()
public static void setSkipPoolingCheck(boolean skipPoolingCheck)
skipPoolingCheck
- if set to true, skips the pooling check, otherwise the pooling check
is performed.public boolean shouldSkipPoolingCheck()
public static void setDebugLogEnabled(boolean debugLoggingEnabled)
debugLoggingEnabled
- if set to true, output from the SDK will be output to LogCatpublic static boolean isDebugLogEnabled()
public static void registerFragmentView(android.view.View fragmentView)
fragmentView
- the view of the fragment to be registeredpublic static void activityStarted(android.app.Activity activity)
activity
- the Activity that startedpublic static void activityResumed(android.app.Activity activity)
activity
- the Activity that has resumed.public static void activityPaused(android.app.Activity activity)
activity
- the Activity that was paused.