Skip to content

Latest commit

 

History

History
108 lines (73 loc) · 5.54 KB

README.md

File metadata and controls

108 lines (73 loc) · 5.54 KB

Making Interactive User Interfaces

In addition to opening regular websites, Summon can open app-like web UIs that use Apache Cordova framework plugins. These UIs are still developed using standard web tools, but they are able to interact directly over Bluetooth and perform native application functions through provided Javascript APIs. Once the UI is hosted online, a peripheral can advertise a link to it, as with an ordinary website. UIs may request and use the native smartphone APIs listed below.

You can use the content in examples/template/www/ to get started.

Examples

Example implementations of apps can be found in examples/. In addition, several Lab11 projects include their own Summon apps:

APIs

Information

Radio

Sensors & Actuators

Content

UI Elements

'Summoning' the UI

If the UI is hosted online, a BLE device can advertise the URL to display as the UI for the device in Summon.

To quickly host a UI, we like to use RawGit, which is a free convenient service that serves your raw HTML, CSS, and Javascript from GitHub.

To fit the URL of the UI in a BLE advertisement, you will likely have to create a short URL link. Google provides a service for this.

Setup the BLE device to advertise the short URL using the Eddystone-URL specification.

For example, a BLE light bulb can advertise https://goo.gl/rwOVN2, which redirects to https://cdn.rawgit.com/lab11/summon/master/user-interfaces/examples/light/www/, a UI hosted on RawGit with source content located at https://github.com/lab11/summon/tree/master/user-interfaces/examples/light/www.

Check out peripheral examples to see implementation of software for various BLE devices.

Debugging

One way to debug a Summon UI is to use the Android logging utility. To get log messages pertinent to Summon:

adb logcat -s "chromium"