TikiSdk

object TikiSdk

The TIKI SDK main class. Use this to add tokenized data ownership, consent, and rewards.

Functions

Link copied to clipboard
fun addOffer(offer: Offer): TikiSdk

Adds an Offer object to the offers dictionary, using its ID as the key.

Link copied to clipboard

Disables or enables the ending UI for accepted offers.

Link copied to clipboard

Disables or enables the ending UI for declined offers.

Link copied to clipboard
fun initialize(id: String, publishingId: String, context: Context, onComplete: () -> Unit? = null): Deferred<Unit>
Link copied to clipboard
fun onAccept(onAccept: (Offer, LicenseRecord) -> Unit?): TikiSdk

Sets the callback function for when an offer is accepted.

Link copied to clipboard
fun onDecline(onDecline: (Offer, LicenseRecord?) -> Unit?): TikiSdk

Sets the callback function for when an offer is declined.

Link copied to clipboard
fun onSettings(onSettings: (Context) -> Deferred<Unit>): TikiSdk

Sets the callback function for when the user selects "Settings" in the ending widget.

Link copied to clipboard
fun present(context: Context)

Presents an Offer to the user and allows them to accept or decline it, which can result in a new LicenseRecordbeing created based on the presented Offer.

Link copied to clipboard
fun removeOffer(offerId: String)

Removes an Offer object from the offers dictionary, using its ID as the key.

Link copied to clipboard
fun settings(context: Context)

Presents the Tiki SDK's pre-built user interface for the settings screen, which allows the user to accept or decline the current offer.

Link copied to clipboard
fun theme(context: Context): Theme

Returns the Theme configured for the specified colorScheme, or the default theme if none is specified or the specified color scheme does not exist.

Properties

Link copied to clipboard
Link copied to clipboard
val dark: Theme

A Theme object for pre-built UIs with a dark mode appearance.

Link copied to clipboard
val id: String
Link copied to clipboard
val idp: Idp
Link copied to clipboard

A Boolean value that determines whether the ending UI is disabled for accepted offers in the pre-built UI.

Link copied to clipboard

A Boolean value that determines whether the ending UI is disabled for declined offers in the pre-built UI.

Link copied to clipboard

Returns a Boolean value indicating whether the TikiSdk has been initialized.

Link copied to clipboard

Creates a new, empty Offer object.

Link copied to clipboard

A dictionary containing all the offers that have been added to the TIKI SDK.

Link copied to clipboard

A Theme object for pre-built UIs.

Link copied to clipboard