Android Sample Application¶
The Trinsic Android sample application makes it easy to interact with the Trinsic API. The sample application is located here
Installation¶
- Clone the
sdk-examples
repository - Open the folder
sdk-examples/android
in Android Studio - Run gradle build for the first time, it will take a while, but it should pull down all the required
.jar
files - You should be able to build and run the android application.
- There is an
sdk-examples/android-controller
application written in Python which allows you to issue credentials/verify proofs outside of the android application for demonstration purposes.
Note
If you want to included the two required Trinsic .jar
files 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}.jar")
file.parentFile.mkdirs()
if (!file.exists()) {
new URL(url).withInputStream { downloadStream ->
file.withOutputStream { fileOut ->
fileOut << downloadStream
}
}
}
files(file.absolutePath)
}
dependencies {
// other dependencies
implementation urlFile('https://github.com/trinsic-id/okapi/releases/download/v1.4.0/trinsic-okapi-1.4.0.jar', 'trinsic-okapi-1.4.0')
implementation urlFile('https://github.com/trinsic-id/sdk/releases/download/v1.4.0/trinsic-services-1.4.1.jar', 'trinsic-services-1.4.1')
}
Next Steps¶
Once the SDK is installed and configured, you're ready to start building! We recommend going through the walkthrough next. If you're ready to dive into building your ecosystem, check out our API Reference