This Starter Guide gets you up and running with creating mobile applications for the Physical Web using the Evothings JavaScript Eddystone API. When you attach a beacon to an object, it becomes part of the Physical Web, and object that a mobile app can monitor and track. It is easy to write Eddystone apps using the fast workflow of Evothings Studio. Read on to learn more!
Eddystone beacons are based on a new type of beacon technology. At the of this article you will find links to introductory articles that explain what Eddystone is. The Eddystone protocol was developed by Google, and is an open and extensible standard for beacons. Beacon vendors have embraced the standard and offer Eddystone compatible beacons.
Real-world example - a beacon attached to copier can provide information and how-to guides via a clever mobile app!
In comparison with iBeacon technology, Eddystone gives you more information, such as the URL of the beacon (hence the concept of the "Physical Web"), signal strength, temperature and battery level. The standard also has room for extensions such as data from embedded sensors, for example motion, orientation, temperature, humidity, light and sound.
With the Evothings JavaScript API for Eddystone, it is very easy for web developers to develop beacon applications.
With Evothings Viewer and Evothings Workbench, you can develop Eddystone apps directly on mobile phones and tablets. When you connect multiple phones to the Workbench, all of them will run the app and reload updates as you edit the code. Any changes you make to the code will instantly be sent to all devices each time you save any of the files in the app. It is easy to develop mobile applications in JavaScript for Eddystone beacons with this fast workflow.
The Eddystone functionality is implemented as a Cordova/PhoneGap plugin. This is an open-source plugin you can use to build a native app for publication on the Google Play Store and the Apple App Store. This plugin is included with Evothings Viewer, so you don't need to do anything special to run an Eddystone app when using Evothings Viewer. When your app is ready to be published, build it using Cordova. More on this below.
Here is what you need to get up and running:
The easiest way to get started is to explore the Eddystone Scan example app that comes with the Evothings Studio download:
A quick way to create your own app is to copy the example app:
Experiment by making some changes to the code:
To change the label that appears in the "My Apps" listing, alter the title tag in index.html.
The Eddystone JavaScript library is packaged as a Cordova plugin. Cordova is a build tool that enables creating native apps you can publish on Apple App Store and Google Play.
If you visit the GitHub repository for the Eddystone Cordova/PhoneGap plugin you will find helpful documentation about the Eddystone JavaScript API.
In addition, the tutorial Detecting Eddystone beacons in JavaScript made easy introduces the library and provides background information about Eddystone.
The Eddystone library is implemented in a JavaScript source file called eddystone.js. This file is included with the Cordova plugin.
JavaScript files for the Cordova plugins are bundled with Evothings Viewer, and these are not visible in the Evothings app folder. Including the link to cordova.js will in turn include eddystone.js and the JavaScript files for all installed plugins.