showAnimation

The showAnimation the method is used to display an animation on the device to indicate either an approved or declined action. This is typically shown after transaction processing.

Request

📘

JSON-RPC 2.0

All methods in TweezerComm follow a JSON-RPC 2.0 structure. See Get Startedfor more details on how the requests are structured and sent.

To invoke this method, set the method field to showAnimation, and include the service name and parameters as shown below.

{
    "jsonrpc": "2.0",
    "method": "showAnimation",
    "id": "1",
    "params": [
        "device",
        {
            "name": "approved",
            "repeat": false,
            "hideAfter": 4,
            "string1": "stringDisplay1",
            "string2": "stringDisplay2"
        }
    ]
}

Request Parameters

The table below describes the parameters of the request:

NameTypeDescription
namestringAnimation name. Valid values: approved, declined
repeatbooleanWhether the animation should repeat (default: false)
hideAfterintegerSeconds to wait before hiding (0 = stay visible)
string1stringOptional text to display as the first message
string2stringOptional text to display as the second message

Response

A successful request will return the following response:

{
    "jsonrpc": "2.0",
    "id": "1",
    "result": {
        "statusCode": 0,
        "statusMessage": "ok"
    }
}

Response Parameters

The table below describes the response parameters for this method:

NameTypeDescription
statusCodeintegerOperation status (0 = success).
statusMessagestringMessage indicating operation result.