Skip to content

Getting started


The SDK requires at least API Level 23.

Gradle Dependency

In your projects root build.gradle add the bittiq maven repository:

allprojects {
    repositories {
        maven {
            url ""

Next add the dependency to the modules build.gradle:

dependencies {
    implementation 'com.bittiq:sdk:<latest_version>' // Production

    // Or if you want to test the sdk with mocked responses use:
    implementation 'com.bittiq:sdk-mock:<latest_version>' // Mock

For the latest version see the changelog.

Initialize SDK

You need to initialize the SDK before you're able to use it. This is normally done somewhere inside your Application subclass and should only be called once during the lifetime of the application. The way the SDK needs to be initialized depends on if you're using the mocked version or not:


BittiqSdk.init(this, "https://{subdomain}", "APIKEY", tokenResolver)

For more information on the tokenResolver see the section below.




If you're going to use the authentication methods provided by the Bittiq SDK (like login and resetPin) and therefore directly using the Bittiq's authentication service from within the app you can set the tokenResolver to null. Otherwise the TokenResolver can be used to provide the SDK with Bittiq access tokens that are acquired through your own API.

The implementation of the token resolver contains a single method: fun resolve(): Tokens. This method is called on a background thread so it's safe to do a synchronous network request. The returned object Tokens has to contain a valid and non-cached access and refresh token. Returning null from this method means that the TokenResolver couldn't resolve tokens, causing the original call to fail with a BittiqClientException with error code auth_access_denied.


If you are using ProGuard the needed rules are included automatically.