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;
    }
}
PropertyTypeDescription
interactionMXOInteractionThe MXO Interaction to assign to a View.
viewViewThe 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();
Note: For more information, see how to assign an Interaction.

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;
    }
}
PropertyTypeDescription
viewViewThe 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();
Note: For more information, see how to exclude an Interaction.

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;
    	}
}
PropertyTypeDescription
interactionObjectThe MXO Interaction.
onResponseFunction1<MXOInteractionResponse, Unit>Provide an MXO Interaction Response handler.
onErrorFunction1<MXOErrorSdk, Unit>Provide an MXO Error SDK handler.
onFailureFunction1<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();
Note: For more information, see how to subscribe/unsubscribe from an Interaction.

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;
    	}
}
PropertyTypeDescription
disableInteractionTrackingBooleanSet to true to disable Interaction tracking.
disableOutboundLinkTrackingBoolean Set to true to disable updating outbound links.
disableWebViewInteractionTrackingBooleanSet to true to disable Interaction tracking of WebView URLs.
usingCustomWebViewClientBooleanIndicating 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();
Note: For more information, see how to disable/enable automatic Interaction tracking, outbound link tracking, or WebView Interaction tracking.