public class MedalliaDigital
extends java.lang.Object
Calling init(Application, String, MDResultCallback)
is mandatory before accessing any other method in this API.
| Constructor and Description |
|---|
MedalliaDigital() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeEngagement(MDResultCallback listener)
Close Engagement API will close sdk engagement if it's open.
|
static void |
customInterceptTrigger(java.lang.String engagementId,
MDInterceptActionType actionType,
MDFailureCallback listener)
Setting a callback in order to update the sdk of action type trigger by the app.
|
static void |
disableIntercept()
Permits app developers to suppress/disable feedback intercepts (and their respective
targeting) from being prompted to the user, usually called in critical flows.
|
static void |
enableIntercept()
Permits app developers to suppress/disable feedback intercepts (and their respective
targeting) from being prompted to the user, usually called in critical flows.
|
static MDCustomFormData |
getCustomFormData(java.lang.String formId)
Get Custom Form data by Form ID.
|
static void |
handleNotification(java.lang.String formId,
MDResultCallback listener)
Enables the app to launch forms directly from push notifications.
|
static void |
init(Application application,
java.lang.String token,
MDResultCallback listener)
This method initializes the SDK and by doing so authenticates the app, and retrieves
configuration elements from Medallia Digital.
|
static void |
revertStopSDK()
Revert Stop SDK API will revive the SDK functionality (if it is stopped).
|
static void |
setActivity(Activity activity)
Set hosting app current activity (for hybrid frameworks).
|
static void |
setCustomAppearance(MDAppearanceMode appearance)
Set custom appearance for native components multi-themes support
(if feature is enabled for this property)
|
static void |
setCustomFormListener(MDCustomFormListener customFormListener)
Setting a callback in order to receive custom form information.
|
static void |
setCustomInterceptListener(MDCustomInterceptListener customInterceptListener)
Setting a callback in order to update the hosted app when custom intercept
is ready to be shown.
|
static void |
setCustomParameter(java.lang.String name,
java.lang.Object value)
The SDK enables the app to set custom parameters of several types.
|
static void |
setCustomParameters(java.util.HashMap<java.lang.String,java.lang.Object> customParameters)
The SDK enables the app to set custom parameters of several types.
|
static void |
setDebugForm(boolean debug)
Set the SDK to download a debug form.
|
static void |
setFeedbackListener(MDFeedbackListener feedbackListener)
Setting a callback in order to receive feedback payload.
|
static void |
setFormListener(MDFormListener formListener)
Setting a callback in order to receive form displayed information.
|
static void |
setInterceptListener(MDInterceptListener interceptListener)
Setting a callback in order to receive intercept information (an intercept can be
androidx.appcompat.app.AlertDialog or Banner displayed asking the user
whether he/she wants to open form/app rating/ any other engagement type object) |
static void |
setLogLevel(MDLogLevel logLevel)
This API method allows the hosting app to see the SDK logs in the console.
|
static void |
setSdkFramework(MDSdkFrameworkType mdSdkFrameworkType)
Set hosting app framework (for hybrid frameworks).
|
static void |
setUserId(java.lang.String userId)
Set User ID
From version 4.1.0 forward the SDK will support the use of customer
identifiers on survey forms.
|
static void |
showForm(java.lang.String formId,
MDResultCallback listener)
Displaying a form on demand, usually a "Feedback" button in app menu.
|
static void |
stopSDK(boolean clearData)
Stop SDK API will stop the SDK functionality.
|
static void |
updateCustomLocale(java.lang.String locale,
MDCallback listener)
Set custom locale for form multi-language support (if feature is enabled for this property)
|
public static void init(Application application,
java.lang.String token,
MDResultCallback listener)
application - your Applicationtoken - Medallia Digital developer token (can be found in the account section of
your Medallia Digital dashboard). Note that this key is assigned
per application.listener - listen to important events reported by the Medallia Digital mobile SDK
during the initialization phase.public static void setActivity(Activity activity)
activity - Activitypublic static void setUserId(java.lang.String userId)
userId - customer identifierpublic static void setDebugForm(boolean debug)
debug - Booleanpublic static void setSdkFramework(MDSdkFrameworkType mdSdkFrameworkType)
mdSdkFrameworkType - MDSdkFrameworkTypepublic static void setCustomParameter(java.lang.String name,
java.lang.Object value)
name - custom parameter namevalue - custom parameter valueString,
Integer(or int), Long(or long), Double(or double),
Float(or float), Boolean(or bool)public static void setCustomParameters(java.util.HashMap<java.lang.String,java.lang.Object> customParameters)
customParameters - map of 'name'(of type String) and 'value'(of a primitive type).
setCustomParameter(String, Object)public static void showForm(java.lang.String formId,
MDResultCallback listener)
formId - form id to determine which form should be shown.listener - success or failure in showing a form.public static void handleNotification(java.lang.String formId,
MDResultCallback listener)
formId - form id to determine which form should be shown.listener - success or failure in showing a form.public static void setFormListener(MDFormListener formListener)
formListener - MDFormListenerpublic static void setCustomFormListener(MDCustomFormListener customFormListener)
customFormListener - MDCustomFormListenerpublic static MDCustomFormData getCustomFormData(java.lang.String formId)
formId - The requested form IDpublic static void setFeedbackListener(MDFeedbackListener feedbackListener)
feedbackListener - MDFeedbackListenerpublic static void customInterceptTrigger(java.lang.String engagementId,
MDInterceptActionType actionType,
MDFailureCallback listener)
engagementId - engagementId id to determine which form should be shown.actionType - action type that selected in the hosted app. MDInterceptActionTypelistener - failure in showing a form. MDFailureCallbackpublic static void setCustomInterceptListener(MDCustomInterceptListener customInterceptListener)
customInterceptListener - MDCustomInterceptListenerpublic static void enableIntercept()
public static void disableIntercept()
enableIntercept()
init(Application, String, MDResultCallback), the intercept
mechanism will be enabled(ergo - enabled by default).public static void setLogLevel(MDLogLevel logLevel)
logLevel - MDLogLevel
THIS METHOD IS ONLY TO BE USED DURING APP INTEGRATION STAGES.
IT IS FORBIDDEN TO LAUNCH APP WITH THIS METHOD INTEGRATED!public static void setInterceptListener(MDInterceptListener interceptListener)
androidx.appcompat.app.AlertDialog or Banner displayed asking the user
whether he/she wants to open form/app rating/ any other engagement type object)interceptListener - MDInterceptListenerpublic static void stopSDK(boolean clearData)
clearData - boolean - clear data determines if the personalized data
should be cleared in addition to stopping the SDKpublic static void revertStopSDK()
public static void updateCustomLocale(java.lang.String locale,
MDCallback listener)
locale - String Custom locale with format of - XX-XX, XX, XX_XX, XX-XXX,
XX_XXX, XXX, XXX-XX, XXX_XX, XXX-XXX, XXX_XXXlistener - MDCallbackpublic static void setCustomAppearance(MDAppearanceMode appearance)
appearance - String Custom appearancepublic static void closeEngagement(MDResultCallback listener)