The documentation was updated on July 28th, 2016.
If you find any inconsistencies, bugs, old information or have any additional questions, please feel free to contact our developer team at email@example.com
All widget rendering, code execution and processing is performed in the cloud - the device simply displays pre-rendered images from the cloud and sends back status and events, such as screen orientation, double tap and shake events.
The environment in which the widgets are run is the same as a web browser and is provided by WebKit.
All rendering and code execution must be performed in under 5 seconds.
The screen resolution is 176x246 and may render the widget in both portrait and landscape orientations. It is completely monochrome, so for better results it is advised to use bitmap fonts and monochrome images.
You can also host the widget code on the DISPLIO cloud without using your own server. This also allows you to build widgets using the Widget Builder, using which you can visualy create the UI and simulate the look on DISPLIO.
If you are familiar with HTML and would like more flexibility than is offered by the Visual editor, you can also use HTML and CSS to create the visual part of your widget.
There are four global variables used to read and write data from DISPLIO.
|displio||Input||Object||Various device status parameters
|conf||Input||Object||Configuration parameters provided by the user.|
|event||Input||String||Event that triggered the update.
|renderData||Output||Object||Values for components created with visual editor. For example, to set value for textfield with name "test", just may use
|FF||Device is on its back|
|FB||Device is with its screen down|
Requests a JSON object from external URL. This method is blocking.
var response = getJSON('http://example.com/data.json'); console.log(response.name); console.log(response.surname);
Set image view component to hide the image if it was previously set.
It is possible to use external libraries, such as jQuery. For URL or HTML widgets simply include a script tag to an external CDN source for the library. For the Visual editor, use the "Upload asset" button to upload the .js file and it will be automatically included.
If you have successfully created and finished your widget and would like to allow other DISPLIO users to install it on their devices, please contact us at firstname.lastname@example.org