ButtonMerchant

ButtonMerchant

class ButtonMerchant

Primary entry point for the Button merchant library.

Members

Types

AttributionTokenListener

interface AttributionTokenListener

An interface to receive callbacks each time the attribution token value has been updated.

Functions

open fun activity(): ButtonUserActivity

An interface through which user activities can be reported.

open fun addAttributionTokenListener(@ NonNullcontext: Context, @ NonNulllistener: ButtonMerchant.AttributionTokenListener)

Registers attribution token listener.

open fun clearAllData(@ NonNullcontext: Context)

Discards the current session and all persisted data.

open fun configure(@ NonNullcontext: Context, @ NonNullapplicationId: String)

Configures ButtonMerchant with your application Id.

open fun features(): Features

An interface through which library features can be enabled/disabled.

@ Nullable

open fun getAttributionToken(@ NonNullcontext: Context): String

The attributionToken from the last inbound Button attributed Intent.

open fun handlePostInstallIntent(@ NonNullcontext: Context, @ NonNulllistener: PostInstallIntentListener)

Checks to see if the user visited a url prior to installing your app.

open fun removeAttributionTokenListener(@ NonNullcontext: Context, @ NonNulllistener: ButtonMerchant.AttributionTokenListener)

Unregisters attribution token listener.

open fun reportEvent(@ NonNullcontext: Context, @ NonNullname: String)

Reports an event and associated properties to Button.

open fun reportOrder(@ NonNullcontext: Context, @ NonNullorder: Order, @ NullableorderListener: OrderListener)

Reports an order to Button.

open fun trackIncomingIntent(@ NonNullcontext: Context, @ NonNullintent: Intent)

Checks the passed Intent for a Button attribution and if present stores the token.