Re: Notifications (368)
Posted: 24 May 2018, 04:27
How to make your notifications into a question
To make a notification into a question add the following code to your JSON
Default is false
Next add a function for what will happen depending on the response
For example:
Ok fun is activated when the user pressed ok
cancel fun is activated when the user pressed cancel
By writing the following nothing will happen when pressed
Here is an example JSON
To make a notification into a question add the following code to your JSON
Code: Select all
"question":true,
Next add a function for what will happen depending on the response
For example:
Code: Select all
"ok fun":[{"actions":[{"type":"toast", "id":"I'm a toast!"}]
"cancel fun":[]
cancel fun is activated when the user pressed cancel
By writing the following nothing will happen when pressed
Code: Select all
"cancel/ok fun":[]
Code: Select all
[{
"id":"question_notify",
"type":"notification",
"frames":[{"bmp":"person.png"}],
"text":"would you like to see a toast?",
"question":true,
"ok fun":[{"actions":[{"type":"toast", "id":"I'm a toast!"}],
"cancel fun":[]
}]