BlueConicClientImpl

Implementation of the BlueConic client, handling the profile retrieval and storage. This may be from cache, persistent storage on the client or direct requests to the BlueConic server.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val activity: Activity?

Returns the current activity.

Link copied to clipboard
open lateinit override var configuration: BlueConicConfiguration

The configuration of the BlueConic client SDK. Not available before initialization.

Link copied to clipboard
open override val context: Context?

Returns the current context.

Link copied to clipboard

BlueConic event manager used to publish Listener and Dialogue events.

Link copied to clipboard
open override var isEnabled: Boolean

Determines whether this client is enabled.

Link copied to clipboard
open override val profile: Profile

BlueConic profile used for various profile operations.

Link copied to clipboard
open override var screenName: String

Returns the screen name. When the screen name is set with a call to createEvent in the Activity's onResume method it will return that screen name. Otherwise it will return the Activity's title. This method is typically used in Plugins.

Link copied to clipboard
open override val segments: MutableList<Segment>

Returns all segments for the profile. The segments are retrieved by each PAGEVIEW event.

Functions

Link copied to clipboard
open override fun createClickEvent(interactionId: String, properties: Map<String, Any?>, context: Activity?, callback: Callback?)

Registers a CLICK event with the given interaction ID, properties and context.

Link copied to clipboard
open override fun createConversionEvent(interactionId: String, properties: Map<String, Any?>, context: Activity?, callback: Callback?)

Registers a CONVERSION event with the given interaction ID, properties and context.

Link copied to clipboard
open override fun createEvent(eventType: String, properties: Map<String, Any?>, context: Activity?, callback: Callback?)

Registers an event of the specified type with the given data. The data object can contain a nested structure to sent over custom events and/or with Timeline context in order to register timeline events.

Link copied to clipboard
open override fun createPageViewEvent(screenName: String, context: Activity, properties: Map<String, Any?>, callback: Callback?)

Registers a PAGEVIEW event with the given screen name, properties and context.

Link copied to clipboard
open override fun createProfile(callback: Callback?)

Clears the profile ID from the BlueConic client locally (cache). A new profile ID will be generated.

Link copied to clipboard
open override fun createTimelineEvent(eventType: String, eventDate: Date, properties: Map<String, Any?>, callback: Callback?)

Registers an event on the timeline of the profile with the given properties.

Link copied to clipboard
open override fun createTimelineEventById(eventId: String, eventType: String, eventDate: Date, properties: Map<String, Any?>, callback: Callback?)

Registers an event on the timeline of the profile with the given properties.

Link copied to clipboard
open override fun createViewEvent(interactionId: String, properties: Map<String, Any?>, context: Activity?, callback: Callback?)

Registers a VIEW event with the given interaction ID, properties and context.

Link copied to clipboard
open override fun deleteProfile(callback: Callback?)

Removes the profile from the BlueConic servers. The profile ID will be removed from the BlueConic client. A new profile ID will be generated.

Link copied to clipboard
open override fun destroyPlugins()

Triggers a call to onDestroy on every plugin that was retrieved at the last PAGEVIEW.

Link copied to clipboard
open override fun getView(expression: String?): View?

Returns a view component based on the given identifier or null if no match is found.

Link copied to clipboard
open override fun hasSegment(segmentId: String?): Boolean

Returns whether a profile has a segment or not.

Link copied to clipboard
open override fun initialize(configuration: BlueConicConfiguration, callback: Callback?)

Initializes the BlueConic client with the given configuration.

Link copied to clipboard
fun loadProfileValues(callback: Callback?)

Refreshes profile properties from the server. When the retrieval failed, the onError() method is invoked on the callback object. When successful the onSuccess() method is invoked. Before loading the values from the server the client sends his changed values to the server.

Link copied to clipboard

Loads the profile property labels.

Link copied to clipboard
fun onConnectivityChanged(isConnected: Boolean)

Callback when the connectivity status is changed.

Link copied to clipboard
open override fun registerPluginClass(pluginClass: Class<out Plugin>)

Register a plugin class. This is optional. Can be used to mark and define which Plugin classes to use for BlueConic when a page view is registered.

open override fun registerPluginClass(pluginClass: Class<out Plugin>, className: String)

Register a plugin class with a specific name. This is optional. Can be used to mark and define which Plugin classes to use for BlueConic when a page view is registered.

Link copied to clipboard
fun setContext(activity: Activity)
Link copied to clipboard
open override fun setLocale(locale: String)

Sets the locale to get parameters for. By default, the default locale configured in BlueConic is used.

Link copied to clipboard
fun setPlatformInformation(platformName: String, platformVersion: String)

Sets the platform information. Only use this method when you want to use it in combination with a BlueConic plugin (ex.: React Native).

Link copied to clipboard
open override fun setSimulatorData(userName: String, mobileSessionId: String)

Set the simulator data for the BlueConic client.

Link copied to clipboard
open override fun updateProfile(callback: Callback?)

Update the profile to sync over the data from the Mobile app to the BlueConic servers and; also pull in the data that has changed on the BlueConic side.