Thursday, 5 November 2015

Future Decoded 2015 - now with iBeacons?

Belfast's Scaboodle today announced via Twitter that they are providing the official delegate's app for Microsoft's prestigious Future Decoded 2015 event:

You can read my write-up of last year's event here if you're interested.

On launching the iOS version of app I was informed that it could make use of iBeacons, I was asked if I was OK with this and given the option to decline. I'm guessing no-one puts a notification like this in for the fun of it, so it seems reasonable to assume there will be some beacon based functionality on offer at the event. I'm attending the tech day on Wednesday 11th November and I look forward to finding out whether the app provides location specific content, indoor location, or something entirely new and unexpected.

It's great to see Microsoft engaging with specialist partners and ISVs such as Scaboodle, rather than doing this work in house, or engaging with one of the large SIs. Here's hoping the event is a success for all involved.

Thursday, 3 September 2015

Version 1.5 of Beacon Scanner and Logger (Free) is here - now featuring Eddystone support

Version 1.5 of Beacon Scanner and Logger (free) is now available on Google Play.

The app now supports Eddystone, and where an Eddystone-URL beacon is detected the URL is rendered as a clickable link, which means you can immediately open the web resource the beacon is directing users to.

There's a new real time log file, which has a fixed name and only ever contains a single entry, that enables simple Tasker integration. This is a feature that's been requested by a couple of users so I hope it's useful to a wider audience.

Source code is available via GitHub.

If anyone has any feature requests, bug reports, or comments please let me know.

Happy scanning. :)

Monday, 3 August 2015

End to end iBeacon demo, featuring hybrid (Cordova) mobile apps and Google app engine backend.

I wanted to put a demo together, using hybrid mobile apps and a Google app engine backend, that would allow me to configure beacons and interactions at runtime, rather than coding them into the app itself.

I implemented a set of 3 demo applications that can be used to capture data describing a fleet of beacons, and configure each beacon record so that a message of the user's choice is displayed when one of the apps encounters the relevant beacon.

Here's a brief overview of the components:

1) admin-app - a Cordova app that allows a user to capture data representing a fleet of beacons and save it to persistent storage. Storage in this case is handled by Google app engine, with a Cloud Endpoint providing the API.

Select your beacon from a list, or add a new beacon...
Enter or edit beacon properties (note the "Message" field - this contains the message
that will be displayed by the interactive beacon app when a beacon is detected).
2) bbepoc - code that will be used to generate a Google Cloud Endpoint which will be used by the 
mobile apps to add, edit and retrieve beacon data.

3) beacon-app - a Cordova app that loads any beacons added via the admin app. On encountering a beacon the app will display whatever message the user entered against the beacon in the admin app; this could obviously be extended to handle other types of interaction, such as showing an image or playing a video.

Here's the interactive beacon app, branded for Objectivity,
displaying a message configured via the admin app. 

Source code and instructions for use can be found in the project's GitHub repository. Comments and suggestions are welcomed.

Thursday, 23 July 2015

A First Look at Eddystone

I received my Eddystone Developer kit from Radius Networks today and was particularly keen to experiment with Eddystone-URL.

The developer kit ships with 3 beacons, 2 RadBeacon USB beacons and 1 RadBeacon Dot. Configuration is handled via the RadBeacon app, which is available for iOS and Android via the App Store and Google Play.

At the time of writing the iOS version of RadBeacon doesn't discover Eddystone compatible RadBeacons, but Radius Networks confirmed via Twitter that Android was a priority and iOS support is imminent.

The RadBeacon app contains help information that describes how to put the USB beacons into configuration mode though it doesn't currently describe how to achieve this with the RadBeacon Dot, fortunately this article on Radius Networks' support site describes the process (thanks to @CraigTaylor74 for helping with this via Twitter).

I had a few false starts configuring the beacons, and found the RadBeacon app didn't always recognise the RadBeacons, initially listing them as "Unspecified Beacon". We're close to day 1 of Eddystone availability though so the odd quirk is to be expected.

I was soon able to get up and running and after configuring the URL property of the beacon and applying the changes the beacons were happily chirping away and transmitting Eddystone-URL frames.

The quickest way to interact with your new Eddystone-URL service is to download Chrome for iOS and enable the Today widget. See this post on the Chromium blog for details.

David G. Young has detailed the full process over on the Radius Networks' Developer Blog, work through the process as described (take note of the tip on using a URL shortener) and you can't go far wrong.

Sunday, 22 February 2015

Adding Google Analytics to Cordova/Phone Gap Hybrid Apps

I've incorporated Google Analytics usage reporting into a hybrid app I'm currently working on and thought I'd share my experience, in the hope that you can get up and running more quickly than I did.

After a quick google search I found a plugin that seemed to be provided via Adobe, which seemed promising, but I couldn't get to work despite much further googling and debugging:

I then looked for an alternative, and found this, but with similar results:

I'm quite prepared to accept that the fact these plugins didn't work for me is probably down to misconfiguration on my part, though it seems I'm not alone as variations on the problem I was seeing have been seen by others:

I encountered the problem described in the link above with both plugins, this is no reflection on the quality of either plugin, but rather my ability to work through the issue in the time available to me. 

The answer turned out to be fairly simple and involved using Google's own javascript API for analytics, as demonstrated in this proof of concept app: https://github.com/blast-analytics-marketing/phonegap-google-universal-analytics

The proof of concept is an implementation of the approach described here: http://www.blastam.com/blog/index.php/2013/07/ga-universal-analytics-phonegap-mobile-apps

I copied the code into my solution, added my app's analytics tracking id, and I was soon up and running.

I did encounter a couple of gotchas though:

Don't forget to give your android app permission to access the internet, by adding the following entry to your android-manifest.xml file:

    <uses-permission android:name="android.permission.INTERNET" />

And remember to strip the leading slash from the path to your analytics.js file if you have it squirrelled away in a subfolder. For example if your local copy of analytics.js is held under www/lib, this won't work once your code is wrapped in an APK:

(window,document,'script','/lib/analytics.js','ga')

...but this will:

(window,document,'script','lib/analytics.js','ga')

Please let me know if you encounter any issues with the above, happy tracking. :)

Wednesday, 28 January 2015

Beginner's Resources for Cordova and PhoneGap - including Self-Defense for PhoneGap Developers

If you're planning to work with Apache Cordova or PhoneGap and you have a web development background, take a look at this highly informative (and very entertaining) presentation from Lyza Danger Gardner of Cloud Four.

It's a high octane dash through the perils and pitfalls of PhoneGap development, and what you can do to avoid them..,or at least anticipate them and brace for impact.

I came across this presentation via a mention in John M. Wargo's Apache Cordova 3 Programming, which is also worth checking out if you're looking to start your Cordova journey the right way.

Wednesday, 7 January 2015

Robin brings Beacons to your Batcave (and Boardroom)

I've recently been working on a proof of concept solution using beacons, the idea being that a user can view availability for nearby rooms and be presented with assets relevant to whichever meeting they happen to be attending. My choice of Cordova for the mobile client app and the fact that I'm targeting an MS Exchange 2010 server introduced some interesting technical issues that I'm still wrestling with.

I stumbled across a SaaS solution called Robin that could give me much of what I need via this post on Beekn,net. As well as the providing the room reservation functionality I want Robin also offers an API that can be used to extend the core offering where needed. Users download their choice of an iOS or Android app to access Robin's functionality.

Robin allows an admin user to create one or more "spaces", each of which would typically represent a meeting room or some other shared resource. A space can be associated with a calendar, Google Calendar is supported at the time of writing, though it seems reasonable to expect that at least MS Exchange and Office 365 will follow.

Things get really interesting when a beacon is added to a space, as the Robin client polls for beacons in an attempt to locate nearby spaces. When a beacon is discovered to be within range the app contacts Robin's back end, tagging the user as within that space and retrieving details of the space for display within the client app.

If the client app stays within range of a space's beacon for 5 minutes, Robin automatically adds a 20 minute reservation to whichever Calendar is associated with that space. This seems to work well; Robin has been happily creating Google Calendar entries and I've seen no strange behaviour as a result of my running the Robin iOS and Android apps simultaneously.

Robin recommend Estimote beacons, which seems a solid choice. A couple of months ago I plugged a Radius Networks RadBeacon into a spare USB slot on each of our video conferencing systems in the UK office, so we already have the required beacon infrastructure in place.

It seems you're tied in to the UUID Robin generates for you (I assume this is to comply with Apple's App Store policy on pre-configured UUIDs) so bear in mind you'll need access to beacons that allow you to configure this attribute, Major and Minor values are user configurable within Robin.  

Pricing essentially works out at 10 US Dollars per month per space, though there are bands applied in an attempt to model typical usage scenarios - you'll find more details here.

I'm looking forward to further evaluating Robin over the next few days, my experiences have been positive so far and I'm seldom happier than when picking through a new API. I'll let you know how I get on.