Factory test

Function

int factoryTest()

Description

Tests if the phone has an active internet connection.

The method returns an initial response whether the request could successfully been sent to the Soft Point-of-Sale app or not.

The result is received by the onProvisionResponse()-method in your client implementation.

Example

Send Factory Test

fun sendFactoryTestProvisionRequest() {
    client.factoryTest().let {
        Log.d(LOG_TAG, "Factory Test result code: $it")
    }
}

Receive Factory Test Provision Response

Extend your client-implementation with following methods:

class ClientImplementation(
    context: Context
) : Client(context, sha256OfSigningCertificate) {

    override fun onProvisionResponse(responseJson: String) {
        super.onProvisionResponse(responseJson)
        Log.d(LOG_TAG, responseJson)
    }

    override fun onProvisionResponse(response: ProvisionResponse) {
        super.onProvisionResponse(response)
        Log.d(LOG_TAG, response.toString())
    }
}