The Client Library streamlines the process of creating a data license by providing a pre-qualified agreement, pre-populated with the company information provided in the Library configuration.

Only a few fields pertinent to your business and the specifics of the agreement are required.

Terms

Use the TikiClient.terms() method to retrieve the license terms in Markdown format. This provides a clear and formatted presentation of the terms for users to review before agreeing to license their data.

let terms = TikiClient.terms()
let terms = TikiClient.terms()
val terms = TikiClient.terms()

License

Upon user agreement, generate the license using the TikiClient.createLicense method. It will create a default license allowing the capture of receipt data from physical and e-mail receipts.

let license - await TikiClient.createLicense()
val activity = getACtivity() // This is sample function to get the current activity from which this function is called. It is used to provide context for the license creation process.    
val license = TikiClient.createLicense(activity).await()
TikiClient.createLicense{ license in
  print(license)
}

This method needs to be invoked once for each device. Once executed, the license is registered in mytiki storage, eliminating the need to recreate it in the future.