com.medallia.mxo.automatic
All of APIs listed on this page are in the com.medallia.mxo.automatic
package.
MXOAutomaticInteractionAssignment
The configuration class used to assign a custom Interaction path to an Activity content View or a Fragment root View.
import com.medallia.mxo.interactions.MXOInteraction;
public class MXOAutomaticInteractionAssignment {
private MXOInteraction interaction;
private View view;
public MXOAutomaticInteractionAssignment(MXOInteraction interaction, View view) {
this.interaction = interaction;
this.view = view;
}
}
Property | Type | Description |
---|---|---|
interaction | MXOInteraction | The MXO Interaction to assign to a View. |
view | View | The View to assign an MXO Interaction path to. |
Create an instance using the Builder as shown below:
final MXOAutomaticInteractionAssignment mxoAutomaticInteractionAssignment = new MXOAutomaticInteractionAssignment.Builder()
.view(View)
.interaction(new MXOInteraction(URI.create("/ypurInteractionPath")))
.build();
MXOAutomaticInteractionExclusion
The class to configure an exclusion of an automatic Interaction.
public class MXOAutomaticInteractionExclusion {
private final View view;
public MXOAutomaticInteractionExclusion(View view) {
this.view = view;
}
}
Property | Type | Description |
---|---|---|
view | View | The View to exclude from automatic Interaction tracking. |
Create an instance using the Builder as shown below:
final MXOAutomaticInteractionExclusion mxoAutomaticInteractionExclusion = new MXOAutomaticInteractionExclusion.Builder()
.view(View)
.build();
MXOAutomaticInteractionSubscriber
The subscriber for receiving automatic Interaction responses.
import android.app.Activity;
import android.util.Log;
import com.medallia.mxo.MXOErrorApi;
import com.medallia.mxo.MXOErrorSdk;
import com.medallia.mxo.automatic.MXOAutomaticInteractionSubscriber;
import com.medallia.mxo.interactions.MXOInteractionResponse;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
public class MXOAutomaticInteractionSubscriber {
private Function1<MXOInteractionResponse, Unit> onResponse;
private Function1<MXOErrorSdk, Unit> onError;
private Function1<MXOErrorApi, Unit> onFailure;
private Object interaction;
public MXOAutomaticInteractionSubscriber(
Function1<MXOInteractionResponse, Unit> onResponse,
Function1<MXOErrorSdk, Unit> onError,
Function1<MXOErrorApi, Unit> onFailure,
Object interaction
) {
this.onResponse = onResponse;
this.onError = onError;
this.onFailure = onFailure;
this.interaction = interaction;
}
}
Property | Type | Description |
---|---|---|
interaction | Object | The MXO Interaction. |
onResponse | Function1<MXOInteractionResponse, Unit> | Provide an MXO Interaction Response handler. |
onError | Function1<MXOErrorSdk, Unit> | Provide an MXO Error SDK handler. |
onFailure | Function1<MXOErrorApi, Unit> | Provide an MXO Error API handler. |
Create an instance using the Builder as shown below:
import android.app.Activity;
import android.util.Log;
import com.medallia.mxo.MXOErrorApi;
import com.medallia.mxo.MXOErrorSdk;
import com.medallia.mxo.automatic.MXOAutomaticInteractionSubscriber;
import com.medallia.mxo.interactions.MXOInteractionResponse;
import java.util.function.Consumer;
Consumer<MXOInteractionResponse> onResponse = (response) -> {
Log.d("AppTag", "Response: " + response.toString());
};
Consumer<MXOErrorSdk> onError = (sdkError) -> {
Log.e("AppTag", "SDK Error", sdkError);
};
Consumer<MXOErrorApi> onFailure = (apiError) -> {
Log.e("AppTag", "Api Error", apiError);
};
Activity activityInteraction = this;
final MXOAutomaticInteractionSubscriber subscriber = new MXOAutomaticInteractionSubscriber.Builder()
.interaction(activityInteraction)
.onResponse(onResponse)
.onError(onError)
.onFailure(onFailure)
.build();
MXOAutomaticInteractionTrackingConfiguration
The configuration object for MXO SDK Interaction tracking.
public class MXOAutomaticInteractionTrackingConfiguration {
private Boolean disableInteractionTracking;
private Boolean disableOutboundLinkTracking;
private Boolean disableWebViewInteractionTracking;
private Boolean usingCustomWebViewClient;
private MXOAutomaticInteractionTrackingConfiguration(Boolean disableInteractionTracking, Boolean disableOutboundLinkTracking, Boolean disableWebViewInteractionTracking, Boolean usingCustomWebViewClient) {
this.disableInteractionTracking = disableInteractionTracking;
this.disableOutboundLinkTracking = disableOutboundLinkTracking;
this.disableWebViewInteractionTracking = disableWebViewInteractionTracking;
this.usingCustomWebViewClient = usingCustomWebViewClient;
}
}
Property | Type | Description |
---|---|---|
disableInteractionTracking | Boolean | Set to true to disable Interaction tracking. |
disableOutboundLinkTracking | Boolean | Set to true to disable updating outbound links. |
disableWebViewInteractionTracking | Boolean | Set to true to disable Interaction tracking of WebView URLs. |
usingCustomWebViewClient | Boolean | Indicating use of custom WebView clients. |
Create an instance using the Builder as shown below:
final MXOAutomaticInteractionTrackingConfiguration configuration = new MXOAutomaticInteractionTrackingConfiguration.Builder()
.disableInteractionTracking(false)
.disableOutboundLinkTracking(false)
.disableWebViewInteractionTracking (false)
.usingCustomWebViewClient (false)
.build();
WebView
Interaction tracking.