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:
Name | Type | Description |
---|---|---|
name | string | Animation name. Valid values: approved , declined |
repeat | boolean | Whether the animation should repeat (default: false) |
hideAfter | integer | Seconds to wait before hiding (0 = stay visible) |
string1 | string | Optional text to display as the first message |
string2 | string | Optional 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:
Name | Type | Description |
---|---|---|
statusCode | integer | Operation status (0 = success). |
statusMessage | string | Message indicating operation result. |
Updated 8 days ago