Skip to content

The Trinsic Java / Kotlin SDK

The Trinsic Java / Kotlin SDK makes it easy to interact with the Trinsic API from any Java (or Kotlin) application. The most recent version of the package is found on the Github Release. You can find the SDKs source on Github.

Installation

  1. Add the urlFile code shown below to your build.gradle.
  2. Add the implementations as shown below to your build.gradle.
  3. Run gradle build to download the required jar files. This can take some time.

Configuration

Note

If you want to include the required Trinsic .jar file in your own application (android or other java), be sure to copy the following lines. They allow you to specify a remote file location as a gradle implementation target as shown below:

def urlFile = { url, name ->
    File file = new File("$buildDir/download/${name}")
    file.parentFile.mkdirs()
    if (!file.exists()) {
        new URL(url).withInputStream { downloadStream ->
            file.withOutputStream { fileOut ->
                fileOut << downloadStream
            }
        }
    }
    files(file.absolutePath)
}
dependencies {
    implementation urlFile('https://github.com/trinsic-id/sdk/releases/download/v1.10.0/trinsic-services-1.10.0.jar', 'trinsic-services-1.10.0')
}