EngagementService

class EngagementService(blueConicClient: BlueConicClient, context: BlueConicClient.InteractionContext, propertyId: String, isInterest: Boolean, allInterests: List<String> = mutableListOf(), useHalfTime: Boolean) : EventServiceBase

Service for the Scoring listener (id: engagement_score) and Interest Ranking listener (id: engagement_interest_ranking)

Constructors

Link copied to clipboard
constructor(blueConicClient: BlueConicClient, context: BlueConicClient.InteractionContext, propertyId: String, isInterest: Boolean, allInterests: List<String> = mutableListOf(), useHalfTime: Boolean)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun addPoints(keyword: String, score: Int)

Adds points for a keyword (e.g. add 5 points for Manchester United) to the _changes objects.

Link copied to clipboard

Applies rules and determines which keywords earn points based on the engagement rule settings.

Link copied to clipboard

Returns the new added points in a format based on the old mechanism.

Link copied to clipboard

Returns the new added points in a format based on the HalfTime mechanism.

Link copied to clipboard
open override fun handleEvent(event: Event)

Called when an event is thrown by the app developer.

Link copied to clipboard
fun save()

Saves the engagement data to the profile.

Inherited functions

Link copied to clipboard
fun registerEvent(rule: JSONObject, className: String)

Registers an event in the event manager.