BLE Scan
+ + - + - +Scanning Paused
+ + -diff --git a/examples/adafruit-bluefruit-led-onoff/evothings.json b/examples/adafruit-bluefruit-led-onoff/evothings.json index a8f9319a..101e12d9 100644 --- a/examples/adafruit-bluefruit-led-onoff/evothings.json +++ b/examples/adafruit-bluefruit-led-onoff/evothings.json @@ -1,16 +1,39 @@ { "name": "adafruit-bluefruit-led-onoff", - "version": "1.0", - "title": "Adafruit Bluefruit LE UART Friend LED On/Off", - "description": "Simple app to control a LED using Adafruit's Bluefruit LE UART Friend board", + "version": "1.0.0", + "title": "Adafruit Bluefruit LE UART LED", + "description": "Simple app to control a LED using Adafruit's Bluefruit LE UART Friend board.", "tags": [ - {"label": "arduino", "type": "platform"}, - {"label": "adafruit", "type": "vendor"}, - {"label": "ble", "type": "comm"}], - "libraries": [{"name": "jquery", "version": "2.1.1"}], + { + "label": "arduino", + "type": "platform" + }, + { + "label": "adafruit", + "type": "vendor" + }, + { + "label": "ble", + "type": "comm" + } + ], + "libraries": [ + { + "name": "jquery", + "version": "2.1.1" + } + ], + "plugins": [ + { + "name": "cordova-plugin-ble", + "version": "2.0.0" + } + ], "app-dir": "app", "index-file": "index.html", "uuid": "fe860e6e-d35e-4bd0-831a-7703cc2f8b18", "icon": "app-icon.png", - "doc-url": "https://evothings.com/2.1/doc/examples/adafruit-bluefruit-led-onoff.html" + "doc-url": "http://evothings.com/2.2/doc/examples/adafruit-bluefruit-led-onoff.html", + "long-description": "Simple app to control a LED using Adafruit's Bluefruit LE UART Friend board.", + "cordova-id": "com.evothings.examples.adafruitbluefruitledonoff" } diff --git a/examples/adafruit-bluefruit-led-onoff/res/feature-graphic-1024x500.png b/examples/adafruit-bluefruit-led-onoff/res/feature-graphic-1024x500.png new file mode 100644 index 00000000..718bbbe1 Binary files /dev/null and b/examples/adafruit-bluefruit-led-onoff/res/feature-graphic-1024x500.png differ diff --git a/examples/adafruit-bluefruit-led-onoff/res/icon-512x512.png b/examples/adafruit-bluefruit-led-onoff/res/icon-512x512.png new file mode 100644 index 00000000..91a1a4a8 Binary files /dev/null and b/examples/adafruit-bluefruit-led-onoff/res/icon-512x512.png differ diff --git a/examples/adafruit-bluefruit-led-onoff/res/promo-graphic-180x120.png b/examples/adafruit-bluefruit-led-onoff/res/promo-graphic-180x120.png new file mode 100644 index 00000000..5fbd7407 Binary files /dev/null and b/examples/adafruit-bluefruit-led-onoff/res/promo-graphic-180x120.png differ diff --git a/examples/adafruit-bluefruit-led-onoff/res/screenshot1.png b/examples/adafruit-bluefruit-led-onoff/res/screenshot1.png new file mode 100644 index 00000000..4364b86c Binary files /dev/null and b/examples/adafruit-bluefruit-led-onoff/res/screenshot1.png differ diff --git a/examples/adafruit-bluefruit-led-onoff/res/screenshot2.png b/examples/adafruit-bluefruit-led-onoff/res/screenshot2.png new file mode 100644 index 00000000..4364b86c Binary files /dev/null and b/examples/adafruit-bluefruit-led-onoff/res/screenshot2.png differ diff --git a/examples/adafruit-bluefruit-rf-data-gatherer/evothings.json b/examples/adafruit-bluefruit-rf-data-gatherer/evothings.json index 31f4d35a..cef38ed4 100644 --- a/examples/adafruit-bluefruit-rf-data-gatherer/evothings.json +++ b/examples/adafruit-bluefruit-rf-data-gatherer/evothings.json @@ -1,16 +1,39 @@ { "name": "adafruit-bluefruit-rf-data-gatherer", - "version": "1.0", - "title": "Adafruit Bluefruit RF Data Gatherer", - "description": "Advanced app using Adafruit's Bluefruit LE UART Friend to send data between Arduino Unos using 433 MHz transmitter-receiver modules", + "version": "1.0.0", + "title": "Adafruit Bluefruit RF Data", + "description": "App using Adafruit's Bluefruit LE UART Friend sending data between Arduino Unos.", "tags": [ - {"label": "arduino", "type": "platform"}, - {"label": "adafruit", "type": "vendor"}, - {"label": "ble", "type": "comm"}], - "libraries": [{"name": "jquery", "version": "2.1.1"}], + { + "label": "arduino", + "type": "platform" + }, + { + "label": "adafruit", + "type": "vendor" + }, + { + "label": "ble", + "type": "comm" + } + ], + "libraries": [ + { + "name": "jquery", + "version": "2.1.1" + } + ], + "plugins": [ + { + "name": "cordova-plugin-ble", + "version": "2.0.0" + } + ], "index-file": "index.html", "app-dir": "app", "uuid": "fe860e6e-d35e-4bd0-831a-7703cc2f8b19", "icon": "app-icon.png", - "doc-url": "https://evothings.com/2.1/doc/examples/adafruit-bluefruit-rf-data-gatherer.html" + "doc-url": "http://evothings.com/2.2/doc/examples/adafruit-bluefruit-rf-data-gatherer.html", + "long-description": "Advanced app using Adafruit's Bluefruit LE UART Friend to send data between Arduino Unos using 433 MHz transmitter-receiver modules.", + "cordova-id": "com.evothings.examples.adafruitbluefruitrfdatagatherer" } diff --git a/examples/adafruit-bluefruit-rf-data-gatherer/res/feature-graphic-1024x500.png b/examples/adafruit-bluefruit-rf-data-gatherer/res/feature-graphic-1024x500.png new file mode 100644 index 00000000..718bbbe1 Binary files /dev/null and b/examples/adafruit-bluefruit-rf-data-gatherer/res/feature-graphic-1024x500.png differ diff --git a/examples/adafruit-bluefruit-rf-data-gatherer/res/icon-512x512.png b/examples/adafruit-bluefruit-rf-data-gatherer/res/icon-512x512.png new file mode 100644 index 00000000..91a1a4a8 Binary files /dev/null and b/examples/adafruit-bluefruit-rf-data-gatherer/res/icon-512x512.png differ diff --git a/examples/adafruit-bluefruit-rf-data-gatherer/res/promo-graphic-180x120.png b/examples/adafruit-bluefruit-rf-data-gatherer/res/promo-graphic-180x120.png new file mode 100644 index 00000000..5fbd7407 Binary files /dev/null and b/examples/adafruit-bluefruit-rf-data-gatherer/res/promo-graphic-180x120.png differ diff --git a/examples/adafruit-bluefruit-rf-data-gatherer/res/screenshot1.png b/examples/adafruit-bluefruit-rf-data-gatherer/res/screenshot1.png new file mode 100644 index 00000000..749c6f58 Binary files /dev/null and b/examples/adafruit-bluefruit-rf-data-gatherer/res/screenshot1.png differ diff --git a/examples/adafruit-bluefruit-rf-data-gatherer/res/screenshot2.png b/examples/adafruit-bluefruit-rf-data-gatherer/res/screenshot2.png new file mode 100644 index 00000000..749c6f58 Binary files /dev/null and b/examples/adafruit-bluefruit-rf-data-gatherer/res/screenshot2.png differ diff --git a/examples/arduino-ble/evothings.json b/examples/arduino-ble/evothings.json index a25fdc4f..25dbc1b9 100644 --- a/examples/arduino-ble/evothings.json +++ b/examples/arduino-ble/evothings.json @@ -1,15 +1,35 @@ { "name": "arduino-ble", - "version": "1.0", + "version": "1.0.0", "title": "Arduino BLE", - "description": "Basic example app to get started with Bluetooth Low Energy (BLE) using an Arduino and a BLE shield", + "description": "Basic example app to get started with BLE using an Arduino and a BLE shield.", "tags": [ - {"label": "arduino", "type": "platform"}, - {"label": "ble", "type": "comm"}], - "libraries": [{"name": "jquery", "version": "2.1.1"}], + { + "label": "arduino", + "type": "platform" + }, + { + "label": "ble", + "type": "comm" + } + ], + "libraries": [ + { + "name": "jquery", + "version": "2.1.1" + } + ], + "plugins": [ + { + "name": "cordova-plugin-ble", + "version": "2.0.0" + } + ], "index-file": "index.html", "app-dir": "app", "uuid": "fe860e6e-d35e-4bd0-831a-7703cc2f8b02", "icon": "app-icon.png", - "doc-url": "https://evothings.com/2.1/doc/examples/arduino-ble.html" + "doc-url": "http://evothings.com/2.2/doc/examples/arduino-ble.html", + "long-description": "Basic example app to get started with Bluetooth Low Energy (BLE) using an Arduino and a BLE shield.", + "cordova-id": "com.evothings.examples.arduinoble" } diff --git a/examples/arduino-ble/res/feature-graphic-1024x500.png b/examples/arduino-ble/res/feature-graphic-1024x500.png new file mode 100644 index 00000000..718bbbe1 Binary files /dev/null and b/examples/arduino-ble/res/feature-graphic-1024x500.png differ diff --git a/examples/arduino-ble/res/icon-512x512.png b/examples/arduino-ble/res/icon-512x512.png new file mode 100644 index 00000000..91a1a4a8 Binary files /dev/null and b/examples/arduino-ble/res/icon-512x512.png differ diff --git a/examples/arduino-ble/res/promo-graphic-180x120.png b/examples/arduino-ble/res/promo-graphic-180x120.png new file mode 100644 index 00000000..5fbd7407 Binary files /dev/null and b/examples/arduino-ble/res/promo-graphic-180x120.png differ diff --git a/examples/arduino-ble/res/screenshot1.png b/examples/arduino-ble/res/screenshot1.png new file mode 100644 index 00000000..2b4bf5ff Binary files /dev/null and b/examples/arduino-ble/res/screenshot1.png differ diff --git a/examples/arduino-ble/res/screenshot2.png b/examples/arduino-ble/res/screenshot2.png new file mode 100644 index 00000000..2b4bf5ff Binary files /dev/null and b/examples/arduino-ble/res/screenshot2.png differ diff --git a/examples/arduino-input-tcp/evothings.json b/examples/arduino-input-tcp/evothings.json index 0bd559f6..5c2576c5 100644 --- a/examples/arduino-input-tcp/evothings.json +++ b/examples/arduino-input-tcp/evothings.json @@ -1,15 +1,34 @@ { "name": "arduino-input-tcp", - "version": "1.0", + "version": "1.0.0", "title": "Arduino Input TCP", - "description": "An app demonstrating how to read analog input from the Arduino using TCP over WiFi and a WiFi shield or an Ethernet shield.", + "description": "An app showing how to read analog input from the Arduino using TCP over WiFi.", "tags": [ - {"label": "arduino", "type": "platform"}, - {"label": "wifi", "type": "comm"}], - "libraries": [{"name": "jquery", "version": "2.1.1"}], + { + "label": "arduino", + "type": "platform" + }, + { + "label": "wifi", + "type": "comm" + } + ], + "libraries": [ + { + "name": "jquery", + "version": "2.1.1" + } + ], + "plugins": [ + { + "name": "cordova-plugin-chrome-apps-sockets-tcp" + } + ], "index-file": "index.html", "app-dir": "app", "uuid": "fe860e6e-d35e-4bd0-831a-7703cc2f8b03", "icon": "app-icon.png", - "doc-url": "https://evothings.com/2.1/doc/examples/arduino-input-tcp.html" + "doc-url": "http://evothings.com/2.2/doc/examples/arduino-input-tcp.html", + "long-description": "An app demonstrating how to read analog input from the Arduino using TCP over WiFi and a WiFi shield or an Ethernet shield.", + "cordova-id": "com.evothings.examples.arduinoinputtcp" } diff --git a/examples/arduino-input-tcp/res/feature-graphic-1024x500.png b/examples/arduino-input-tcp/res/feature-graphic-1024x500.png new file mode 100644 index 00000000..718bbbe1 Binary files /dev/null and b/examples/arduino-input-tcp/res/feature-graphic-1024x500.png differ diff --git a/examples/arduino-input-tcp/res/icon-512x512.png b/examples/arduino-input-tcp/res/icon-512x512.png new file mode 100644 index 00000000..91a1a4a8 Binary files /dev/null and b/examples/arduino-input-tcp/res/icon-512x512.png differ diff --git a/examples/arduino-input-tcp/res/promo-graphic-180x120.png b/examples/arduino-input-tcp/res/promo-graphic-180x120.png new file mode 100644 index 00000000..5fbd7407 Binary files /dev/null and b/examples/arduino-input-tcp/res/promo-graphic-180x120.png differ diff --git a/examples/arduino-input-tcp/res/screenshot1.png b/examples/arduino-input-tcp/res/screenshot1.png new file mode 100644 index 00000000..72863e08 Binary files /dev/null and b/examples/arduino-input-tcp/res/screenshot1.png differ diff --git a/examples/arduino-input-tcp/res/screenshot2.png b/examples/arduino-input-tcp/res/screenshot2.png new file mode 100644 index 00000000..72863e08 Binary files /dev/null and b/examples/arduino-input-tcp/res/screenshot2.png differ diff --git a/examples/arduino-led-onoff-ble/evothings.json b/examples/arduino-led-onoff-ble/evothings.json index 19bf1308..514ebc6f 100644 --- a/examples/arduino-led-onoff-ble/evothings.json +++ b/examples/arduino-led-onoff-ble/evothings.json @@ -1,15 +1,35 @@ { "name": "arduino-led-onoff-ble", - "version": "1.0", + "version": "1.0.0", "title": "Arduino LED On/Off BLE", - "description": "Simple app to control an Arduino using Bluetooth Low Energy (BLE)", + "description": "Simple app to control an Arduino using Bluetooth Low Energy (BLE).", "tags": [ - {"label": "arduino", "type": "platform"}, - {"label": "ble", "type": "comm"}], - "libraries": [{"name": "jquery", "version": "2.1.1"}], + { + "label": "arduino", + "type": "platform" + }, + { + "label": "ble", + "type": "comm" + } + ], + "libraries": [ + { + "name": "jquery", + "version": "2.1.1" + } + ], + "plugins": [ + { + "name": "cordova-plugin-ble", + "version": "2.0.0" + } + ], "index-file": "index.html", "app-dir": "app", "uuid": "fe860e6e-d35e-4bd0-831a-7703cc2f8b04", "icon": "app-icon.png", - "doc-url": "https://evothings.com/2.1/doc/examples/arduino-led-onoff-ble.html" + "doc-url": "http://evothings.com/2.2/doc/examples/arduino-led-onoff-ble.html", + "long-description": "Simple app to control an Arduino using Bluetooth Low Energy (BLE).", + "cordova-id": "com.evothings.examples.arduinoledonoffble" } diff --git a/examples/arduino-led-onoff-ble/res/feature-graphic-1024x500.png b/examples/arduino-led-onoff-ble/res/feature-graphic-1024x500.png new file mode 100644 index 00000000..718bbbe1 Binary files /dev/null and b/examples/arduino-led-onoff-ble/res/feature-graphic-1024x500.png differ diff --git a/examples/arduino-led-onoff-ble/res/icon-512x512.png b/examples/arduino-led-onoff-ble/res/icon-512x512.png new file mode 100644 index 00000000..91a1a4a8 Binary files /dev/null and b/examples/arduino-led-onoff-ble/res/icon-512x512.png differ diff --git a/examples/arduino-led-onoff-ble/res/promo-graphic-180x120.png b/examples/arduino-led-onoff-ble/res/promo-graphic-180x120.png new file mode 100644 index 00000000..5fbd7407 Binary files /dev/null and b/examples/arduino-led-onoff-ble/res/promo-graphic-180x120.png differ diff --git a/examples/arduino-led-onoff-ble/res/screenshot1.png b/examples/arduino-led-onoff-ble/res/screenshot1.png new file mode 100644 index 00000000..c84d0d43 Binary files /dev/null and b/examples/arduino-led-onoff-ble/res/screenshot1.png differ diff --git a/examples/arduino-led-onoff-ble/res/screenshot2.png b/examples/arduino-led-onoff-ble/res/screenshot2.png new file mode 100644 index 00000000..c84d0d43 Binary files /dev/null and b/examples/arduino-led-onoff-ble/res/screenshot2.png differ diff --git a/examples/arduino-led-onoff-tcp/evothings.json b/examples/arduino-led-onoff-tcp/evothings.json index 40cacc83..1cca113c 100644 --- a/examples/arduino-led-onoff-tcp/evothings.json +++ b/examples/arduino-led-onoff-tcp/evothings.json @@ -1,15 +1,34 @@ { "name": "arduino-led-onoff-tcp", - "version": "1.0", + "version": "1.0.0", "title": "Arduino LED On/Off TCP", "description": "Simple app to control an Arduino using Wifi or Ethernet", "tags": [ - {"label": "arduino", "type": "platform"}, - {"label": "wifi", "type": "comm"}], - "libraries": [{"name": "jquery", "version": "2.1.1"}], + { + "label": "arduino", + "type": "platform" + }, + { + "label": "wifi", + "type": "comm" + } + ], + "libraries": [ + { + "name": "jquery", + "version": "2.1.1" + } + ], + "plugins": [ + { + "name": "cordova-plugin-chrome-apps-sockets-tcp" + } + ], "index-file": "index.html", "app-dir": "app", "uuid": "fe860e6e-d35e-4bd0-831a-7703cc2f8b05", "icon": "app-icon.png", - "doc-url": "https://evothings.com/2.1/doc/examples/arduino-led-onoff-tcp.html" + "doc-url": "http://evothings.com/2.2/doc/examples/arduino-led-onoff-tcp.html", + "long-description": "Simple app to control an Arduino using Wifi or Ethernet.", + "cordova-id": "com.evothings.examples.arduinoledonofftcp" } diff --git a/examples/arduino-led-onoff-tcp/res/feature-graphic-1024x500.png b/examples/arduino-led-onoff-tcp/res/feature-graphic-1024x500.png new file mode 100644 index 00000000..718bbbe1 Binary files /dev/null and b/examples/arduino-led-onoff-tcp/res/feature-graphic-1024x500.png differ diff --git a/examples/arduino-led-onoff-tcp/res/icon-512x512.png b/examples/arduino-led-onoff-tcp/res/icon-512x512.png new file mode 100644 index 00000000..91a1a4a8 Binary files /dev/null and b/examples/arduino-led-onoff-tcp/res/icon-512x512.png differ diff --git a/examples/arduino-led-onoff-tcp/res/promo-graphic-180x120.png b/examples/arduino-led-onoff-tcp/res/promo-graphic-180x120.png new file mode 100644 index 00000000..5fbd7407 Binary files /dev/null and b/examples/arduino-led-onoff-tcp/res/promo-graphic-180x120.png differ diff --git a/examples/arduino-led-onoff-tcp/res/screenshot1.png b/examples/arduino-led-onoff-tcp/res/screenshot1.png new file mode 100644 index 00000000..5ec97eed Binary files /dev/null and b/examples/arduino-led-onoff-tcp/res/screenshot1.png differ diff --git a/examples/arduino-led-onoff-tcp/res/screenshot2.png b/examples/arduino-led-onoff-tcp/res/screenshot2.png new file mode 100644 index 00000000..5ec97eed Binary files /dev/null and b/examples/arduino-led-onoff-tcp/res/screenshot2.png differ diff --git a/examples/arduino-scriptable-tcp/evothings.json b/examples/arduino-scriptable-tcp/evothings.json index 72506f30..d72d8aa3 100644 --- a/examples/arduino-scriptable-tcp/evothings.json +++ b/examples/arduino-scriptable-tcp/evothings.json @@ -1,15 +1,34 @@ { "name": "arduino-scriptable-tcp", - "version": "1.0", + "version": "1.0.0", "title": "Arduino Scriptable TCP", - "description": "App with a simple UI to script your Arduino over TCP", + "description": "App with a simple UI to script your Arduino over TCP.", + "long-description": "App with a simple UI to script your Arduino over TCP.", "tags": [ - {"label": "arduino", "type": "platform"}, - {"label": "wifi", "type": "comm"}], - "libraries": [{"name": "jquery", "version": "2.1.1"}], + { + "label": "arduino", + "type": "platform" + }, + { + "label": "wifi", + "type": "comm" + } + ], + "libraries": [ + { + "name": "jquery", + "version": "2.1.1" + } + ], + "plugins": [ + { + "name": "cordova-plugin-chrome-apps-sockets-tcp" + } + ], "index-file": "index.html", "app-dir": "app", "uuid": "fe860e6e-d35e-4bd0-831a-7703cc2f8b06", "icon": "app-icon.png", - "doc-url": "https://evothings.com/2.1/doc/examples/arduino-scriptable-tcp.html" + "doc-url": "http://evothings.com/2.2/doc/examples/arduino-scriptable-tcp.html", + "cordova-id": "com.evothings.examples.arduinoscriptabletcp" } diff --git a/examples/arduino-scriptable-tcp/res/feature-graphic-1024x500.png b/examples/arduino-scriptable-tcp/res/feature-graphic-1024x500.png new file mode 100644 index 00000000..718bbbe1 Binary files /dev/null and b/examples/arduino-scriptable-tcp/res/feature-graphic-1024x500.png differ diff --git a/examples/arduino-scriptable-tcp/res/icon-512x512.png b/examples/arduino-scriptable-tcp/res/icon-512x512.png new file mode 100644 index 00000000..91a1a4a8 Binary files /dev/null and b/examples/arduino-scriptable-tcp/res/icon-512x512.png differ diff --git a/examples/arduino-scriptable-tcp/res/promo-graphic-180x120.png b/examples/arduino-scriptable-tcp/res/promo-graphic-180x120.png new file mode 100644 index 00000000..5fbd7407 Binary files /dev/null and b/examples/arduino-scriptable-tcp/res/promo-graphic-180x120.png differ diff --git a/examples/arduino-scriptable-tcp/res/screenshot1.png b/examples/arduino-scriptable-tcp/res/screenshot1.png new file mode 100644 index 00000000..ee1f9507 Binary files /dev/null and b/examples/arduino-scriptable-tcp/res/screenshot1.png differ diff --git a/examples/arduino-scriptable-tcp/res/screenshot2.png b/examples/arduino-scriptable-tcp/res/screenshot2.png new file mode 100644 index 00000000..ee1f9507 Binary files /dev/null and b/examples/arduino-scriptable-tcp/res/screenshot2.png differ diff --git a/examples/arduino101-led-onoff/evothings.json b/examples/arduino101-led-onoff/evothings.json index 1e194fb7..c40b3b15 100644 --- a/examples/arduino101-led-onoff/evothings.json +++ b/examples/arduino101-led-onoff/evothings.json @@ -1,15 +1,35 @@ { "name": "arduino101-led-onoff", - "version": "1.0", + "version": "1.0.0", "title": "Arduino101 LED On/Off BLE", - "description": "Simple app to get stated with the Arduino/Genuino 101 Bluetooth Low Energy (BLE) communication", + "description": "Simple app to get started with Arduino/Genuino 101 BLE communication.", "tags": [ - {"label": "arduino", "type": "platform"}, - {"label": "ble", "type": "comm"}], - "libraries": [{"name": "jquery", "version": "2.1.1"}], + { + "label": "arduino", + "type": "platform" + }, + { + "label": "ble", + "type": "comm" + } + ], + "libraries": [ + { + "name": "jquery", + "version": "2.1.1" + } + ], + "plugins": [ + { + "name": "cordova-plugin-ble", + "version": "2.0.0" + } + ], "index-file": "index.html", "app-dir": "app", "uuid": "fe860e6e-d35e-4bd0-831a-7703cc2f8b14", "icon": "app-icon.png", - "doc-url": "https://evothings.com/2.1/doc/examples/arduino101-led-onoff.html" + "doc-url": "http://evothings.com/2.2/doc/examples/arduino101-led-onoff.html", + "long-description": "Simple app to get started with the Arduino/Genuino 101 and Bluetooth Low Energy (BLE) communication.", + "cordova-id": "com.evothings.examples.arduino101ledonoff" } diff --git a/examples/arduino101-led-onoff/res/feature-graphic-1024x500.png b/examples/arduino101-led-onoff/res/feature-graphic-1024x500.png new file mode 100644 index 00000000..718bbbe1 Binary files /dev/null and b/examples/arduino101-led-onoff/res/feature-graphic-1024x500.png differ diff --git a/examples/arduino101-led-onoff/res/icon-512x512.png b/examples/arduino101-led-onoff/res/icon-512x512.png new file mode 100644 index 00000000..91a1a4a8 Binary files /dev/null and b/examples/arduino101-led-onoff/res/icon-512x512.png differ diff --git a/examples/arduino101-led-onoff/res/promo-graphic-180x120.png b/examples/arduino101-led-onoff/res/promo-graphic-180x120.png new file mode 100644 index 00000000..5fbd7407 Binary files /dev/null and b/examples/arduino101-led-onoff/res/promo-graphic-180x120.png differ diff --git a/examples/arduino101-led-onoff/res/screenshot1.png b/examples/arduino101-led-onoff/res/screenshot1.png new file mode 100644 index 00000000..bb4f03b0 Binary files /dev/null and b/examples/arduino101-led-onoff/res/screenshot1.png differ diff --git a/examples/arduino101-led-onoff/res/screenshot2.png b/examples/arduino101-led-onoff/res/screenshot2.png new file mode 100644 index 00000000..bb4f03b0 Binary files /dev/null and b/examples/arduino101-led-onoff/res/screenshot2.png differ diff --git a/examples/ble-discovery/evothings.json b/examples/ble-discovery/evothings.json index fcb4c8a0..de845d18 100644 --- a/examples/ble-discovery/evothings.json +++ b/examples/ble-discovery/evothings.json @@ -1,13 +1,25 @@ { "name": "ble-discovery", - "version": "1.0", + "version": "1.0.0", "title": "BLE Discovery", - "description": "App to discover Bluetooth Low Energy (BLE) devices and then connect to and display data for a BLE device", + "description": "App to discover Bluetooth Low Energy (BLE) devices and display data.", + "long-description": "App to discover Bluetooth Low Energy (BLE) devices and then connect to and display data for a BLE device.", "tags": [ - {"label": "ble", "type": "comm"}], + { + "label": "ble", + "type": "comm" + } + ], "libraries": [], + "plugins": [ + { + "name": "cordova-plugin-ble", + "version": "2.0.0" + } + ], "index-file": "index.html", "uuid": "fe860e6e-d35e-4bd0-831a-7703cc2f8b08", + "cordova-id": "com.evothings.examples.blediscovery", "icon": "app-icon.png", - "doc-url": "https://evothings.com/2.1/doc/examples/ble-discovery.html" + "doc-url": "https://evothings.com/2.2/doc/examples/ble-discovery.html" } diff --git a/examples/ble-discovery/res/feature-graphic-1024x500.png b/examples/ble-discovery/res/feature-graphic-1024x500.png new file mode 100644 index 00000000..718bbbe1 Binary files /dev/null and b/examples/ble-discovery/res/feature-graphic-1024x500.png differ diff --git a/examples/ble-discovery/res/icon-512x512.png b/examples/ble-discovery/res/icon-512x512.png new file mode 100644 index 00000000..91a1a4a8 Binary files /dev/null and b/examples/ble-discovery/res/icon-512x512.png differ diff --git a/examples/ble-discovery/res/promo-graphic-180x120.png b/examples/ble-discovery/res/promo-graphic-180x120.png new file mode 100644 index 00000000..5fbd7407 Binary files /dev/null and b/examples/ble-discovery/res/promo-graphic-180x120.png differ diff --git a/examples/ble-discovery/res/screenshot1.png b/examples/ble-discovery/res/screenshot1.png new file mode 100644 index 00000000..c19e3650 Binary files /dev/null and b/examples/ble-discovery/res/screenshot1.png differ diff --git a/examples/ble-discovery/res/screenshot2.png b/examples/ble-discovery/res/screenshot2.png new file mode 100644 index 00000000..c19e3650 Binary files /dev/null and b/examples/ble-discovery/res/screenshot2.png differ diff --git a/examples/ble-scan/app.css b/examples/ble-scan/app.css new file mode 100755 index 00000000..d9939356 --- /dev/null +++ b/examples/ble-scan/app.css @@ -0,0 +1,63 @@ +/* CSS for the BLE Scan app. We use Material Design Lite (MDL) +and tweak some of the standard layout settings below. */ + +/* Set spacing for page content. */ +.page-content +{ + margin: 10px 15px;; +} + +/* Info text margins. */ +.app-info +{ + margin-top: 15px; + margin-bottom: 15px; +} + +/* Give some space before and after Start/Stop buttons. */ +.app-buttons +{ + margin-top: 15px; + margin-bottom: 15px; +} + +/* BLE devices are shown as cards, we style them a bit. */ +.mdl-card +{ + min-height: 100px; + margin: 15px 0px; + width: 100%; +} + +/* Make card title display more tightly. */ +.mdl-card__title +{ + padding-bottom: 6px; +} + +/* Color of card text. */ +.mdl-card__supporting-text +{ + color: rgba(0,0,0,0.67); +} + +/* Custom modification of the "burger icon" for the +drawer menu. We move it to give room for a back button icon. */ +.mdl-layout__drawer-button +{ + left: 35px; +} + +/* Show and position the back button icon (this probably breaks +Material Design rules. :) */ +.mdl-layout-icon +{ + display: block !important; + left: 10px !important; +} + +/* Also move the header with the title to give room for back icon. */ +.mdl-layout__header-row +{ + padding-left: 100px; +} diff --git a/examples/ble-scan/app.js b/examples/ble-scan/app.js index 1d4b2b5b..84991e1b 100644 --- a/examples/ble-scan/app.js +++ b/examples/ble-scan/app.js @@ -1,143 +1,224 @@ // JavaScript code for the BLE Scan example app. +// The code is inside a closure to avoid polluting the global scope. +;(function() +{ + +// Dictionary of found devices. +var devices = {} -// Application object. -var app = {}; +// Timer that updates the displayed list of devices. +var updateTimer = null + +function main() +{ + $(function() + { + // When document has loaded we attach FastClick to + // eliminate the 300 ms delay on click events. + FastClick.attach(document.body) + + // Event listener for Back button. + $('.app-back').on('click', function() { history.back() }) + }) + + // Event handler called when Cordova plugins have loaded. + document.addEventListener( + 'deviceready', + onDeviceReady, + false) +} + +function onDeviceReady() +{ + // Un-gray buttons. + $('button.app-start-scan') + .removeClass('mdl-button--disabled') + .addClass('mdl-color--green-A700') + $('button.app-stop-scan') + .removeClass('mdl-button--disabled') + .addClass('mdl-color--deep-orange-900') + + // Attach event listeners. + $('.app-start-scan').on('click', startScan) + $('.app-stop-scan').on('click', stopScan) +} + +function startScan() +{ + // Make sure scan is stopped. + stopScan() + + // Start scan. + evothings.ble.startScan( + function(device) + { + // Device found. Sometimes an RSSI of +127 is reported. + // We filter out these values here. + if (device.rssi <= 0) + { + // Set timeStamp. + device.timeStamp = Date.now() + + // Store device in table of found devices. + devices[device.address] = device + } + }, + function(error) + { + showMessage('Scan error: ' + error) + stopScan() + } + ) + + // Start update timer. + updateTimer = setInterval(updateDeviceList, 500) + + // Update UI. + $('.mdl-progress').addClass('mdl-progress__indeterminate') + showMessage('Scan started') +} + +function stopScan() +{ + // Stop scan. + evothings.ble.stopScan() -// Device list. -app.devices = {}; + // Clear devices. + devices = {} -// UI methods. -app.ui = {}; + // Stop update timer. + if (updateTimer) + { + clearInterval(updateTimer) + updateTimer = null + } -// Timer that updates the device list and removes inactive -// devices in case no devices are found by scan. -app.ui.updateTimer = null; + // Update UI. + $('.mdl-progress').removeClass('mdl-progress__indeterminate') + $('.app-cards').empty() + hideDrawerIfVisible() -app.initialize = function() +} + +function hideDrawerIfVisible() { - document.addEventListener( - 'deviceready', - function() { evothings.scriptsLoaded(app.onDeviceReady) }, - false); -}; + if ($('.mdl-layout__drawer').hasClass('mdl-layout__drawer is-visible')) + { + document.querySelector('.mdl-layout').MaterialLayout.toggleDrawer() + } +} -app.onDeviceReady = function() +function showMessage(message) { - // Not used. - // Here you can update the UI to say that - // the device (the phone/tablet) is ready - // to use BLE and other Cordova functions. -}; - -// Start the scan. Call the callback function when a device is found. -// Format: -// callbackFun(deviceInfo, errorCode) -// deviceInfo: address, rssi, name -// errorCode: String -app.startScan = function(callbackFun) + document.querySelector('.mdl-snackbar').MaterialSnackbar.showSnackbar( + { + message: message + }) +} + +function updateDeviceList() { - app.stopScan(); - - evothings.ble.startScan( - function(device) - { - // Report success. Sometimes an RSSI of +127 is reported. - // We filter out these values here. - if (device.rssi <= 0) - { - callbackFun(device, null); - } - }, - function(errorCode) - { - // Report error. - callbackFun(null, errorCode); - } - ); -}; - -// Stop scanning for devices. -app.stopScan = function() + var timeNow = Date.now(); + + $.each(devices, function(key, device) + { + // Only show devices that have been updated during the last 10 seconds. + if (device.timeStamp + 10000 > timeNow) + { + displayDevice(device) + } + else + { + // Remove inactive device. + removeDevice(device) + } + }) +} + +function displayDevice(device) { - evothings.ble.stopScan(); -}; + if (!deviceIsDisplayed(device)) + { + createDevice(device) + } + + updateDevice(device) +} -// Called when Start Scan button is selected. -app.ui.onStartScanButton = function() +function deviceIsDisplayed(device) { - app.startScan(app.ui.deviceFound); - app.ui.displayStatus('Scanning...'); - app.ui.updateTimer = setInterval(app.ui.displayDeviceList, 500); -}; + var deviceId = '#' + getDeviceDomId(device) + return !!($(deviceId).length) +} -// Called when Stop Scan button is selected. -app.ui.onStopScanButton = function() +function updateDevice(device) { - app.stopScan(); - app.devices = {}; - app.ui.displayStatus('Scan Paused'); - app.ui.displayDeviceList(); - clearInterval(app.ui.updateTimer); -}; - -// Called when a device is found. -app.ui.deviceFound = function(device, errorCode) + // Map the RSSI value to a width in percent for the indicator. + var distanceBarValue = 100; // Used when RSSI is zero or greater. + if (device.rssi < -100) { distanceBarValue = 1; } + else if (device.rssi < 0) { distanceBarValue = 100 + device.rssi; } + + var deviceId = '#' + getDeviceDomId(device) + + $(deviceId + ' .device-rssi') + .text(device.rssi) + + $(deviceId + ' .device-distance-bar') + .css('width', distanceBarValue + 'px') + + if (!device.advertisementData) return + + $(deviceId + ' .device-kCBAdvDataLocalName') + .text(device.advertisementData.kCBAdvDataLocalName) + $(deviceId + ' .device-kCBAdvDataTxPowerLevel') + .text(device.advertisementData.kCBAdvDataTxPowerLevel) + $(deviceId + ' .device-kCBAdvDataIsConnectable') + .text(device.advertisementData.kCBAdvDataIsConnectable) + $(deviceId + ' .device-kCBAdvDataServiceUUIDs') + .text(JSON.stringify(device.advertisementData.kCBAdvDataServiceUUIDs)) + $(deviceId + ' .device-kCBAdvDataServiceData') + .text(JSON.stringify(device.advertisementData.kCBAdvDataServiceData)) +} + +function createDevice(device) { - if (device) - { - // Set timestamp for device (this is used to remove - // inactive devices). - device.timeStamp = Date.now(); - - // Insert the device into table of found devices. - app.devices[device.address] = device; - } - else if (errorCode) - { - app.ui.displayStatus('Scan Error: ' + errorCode); - } -}; - -// Display the device list. -app.ui.displayDeviceList = function() + // Create HTML element to display device data. + var domId = getDeviceDomId(device); + var element = $( + '
Scanning Paused
+ + -Sometimes BLE stops working when switching between apps or doing multiple reloads. In this case restart the Evothings Client app. Additionally, you can use the Evothings Workbench Tools to see any error messages that may help in your investigation.
+ + -