One Beacon App – Many Uses

Many existing or new mobile apps can be made more immersive and hence improve retention through the use of beacons. Sometimes, app authors add beacon detection and suddenly realise their app is also useful to totally different usecases.

One such app is Tourist Chat which started out as a travel app to allow tourists to connect. The author recently started using the same app and server side to support exhibition events.  Many beacon apps are essentially the same. They detect beacons and match this up to information in a server-side CMS. The ‘use’ or scenario can be many things: for example travel, exhibitions, hotels, retail, galleries and museums.

If you are creating a beacon-driven app, take a moment to think how it might also be re-purposed for other types of user. You might find a new market and revenue stream with relatively little effort.

Bluetooth Scanning on Android Oreo

Successive Android versions have become increasingly strict on what goes on in background in order to save battery power. The usual way of scanning for beacons on Android is to have an Android Service that uses the Bluetooth API to scan for beacons every n seconds. From Android Oreo (8.0), this is no longer reliable as the OS has background limitations that kill the Service soon after the app UI has gone from the foreground.

Apps now have to use the BluetoothManager BluetoothLEScanner call that sets up a callbackIntent that fires when beacons are seen.

“The scan results will be delivered via the PendingIntent. Use this method of scanning if your process is not always running and it should be started when scan results are available.”

Apps that target multiple Android versions need to support both the old and new mechanisms which complicates development (and support).

We offer development services should you need any further advice.

Android O Bluetooth 5 Device API Observations

Last March we took a closer look at Bluetooth 5 and concluded there are tradeoffs between long range, high speed, legacy (today’s) phone compatibility and efficient battery.

We are starting to see corresponding development APIs appear for devices that will detect Bluetooth 5 beacons. Android (O) has a new setPreferredPhy call that allows apps to choose the PHY modes mentioned in our previous article.

As expected, high speed and long range are mutually exclusive and if you want to remain compatible with older (current) beacons then you can’t have the high speed or long range. Long range and high speed are only supported if the hardware supports it which means old (current) smartphones won’t get Bluetooth 5 support through a software upgrade.

The availability of the Android API raises new questions. Our understanding is that PHY is a low level thing and that the Bluetooth hardware can only work in one PHY mode at a time. If so, what if an app changes the PHY? Does this switch for all apps? What are implications? For example, what if one app, for example an existing app, needs to use older beacons in compatibility mode while another app wants to use Bluetooth 5 long range beacons? Maybe we are wrong and the underlying Bluetooth 5 firmware somehow multi-tasks PHY modes? Finally, how does the app know the device is Bluetooth 5 capable? It remains to be seen how the fragmentation of capability and behaviour is going to be workable on a typical app. Will most apps end up defaulting to compatibility mode, the long range and high speed only being used for special cases (devices)? In any case, we can see it’s likely that Bluetooth 5 is going to complicate beacon app development.

28/6 UPDATE: In response to this post, Martin Woolley of the Bluetooth SIG answered all our questions! Hardware, hence Android O, can have several PHY modes active at the same time provided the underlying device supports this.

iBeacon App Development Considerations

If you are considering writing apps to communicate with iBeacons, here are some high level things you need to think about that are specific to beacon app development:

  • Detecting whether Location and Bluetooth are on/off and alerting the user for permission to use these
  • Detecting beacons in background when the iOS app is closed or the Android app is in doze mode
  • On Android, taking account of the various Bluetooth APIs that exist for the different Android releases
  • Fetching data, associated with a beacon, from a service, such that it’s cached and not fetched every time
  • Arranging for some initial data bundled with the app so that it works straight away without a data connection
  • Fetching data before it is needed such that it’s available with no delay and when there’s no network connection
  • Re-fetching of data when it becomes stale
  • Fetching metadata from the server to control the behaviour of triggering
  • Arranging how Apple will test the app for app review otherwise complications will arise and the review will take weeks
  • Assessing whether to use the mobile OS or manufacturer supplied SDKs (or both)
  • If connecting to beacons, taking account of the unreliability of wireless connections
  • Collecting and uploading statistics/analytics to assess usage
  • Providing end user diagnostics to aid support troubleshooting

Need an experienced beacon app developer to get these things done quicker? Consider our development services.

Google’s Proximity Beacon API

Most beacon platforms are fairly limited in that they are designed around retail marketing scenarios. If you are creating a non-retail marketing solution you might want to look into Google’s little publicised Proximity Beacon API. It allows you to register beacons and have arbitrary data, called attachments, associated with them. What’s more, it supports the registration of iBeacon as well as Eddystone beacons and you can use it free of charge.

The usual usecase is setup via Google’s console followed by update from apps detecting beacons. Android and iOS example are available.

It’s not always apps that are used to detect beacons. For example, you might have a single board computer such as the Raspberry Pi or Bluetooth-WiFi gateway detecting beacons and a web front end managing and monitoring the beacons. Google also provides example scripts that show how other entities can be used to register, list and filter beacons. Alternatively, other entities might even call these scripts.

The storing of arbitrary data allows the proximity Beacon API to be used for scenarios beyond retail marketing such as sensing with sensor beacons and real time locating (RTLS).

Beacon Locator Android App

A growing number of people are using beacons for personal use. Today, we added the Beacon Locator Android app to our Solutions Directory. It allows you to set up action types such as opening a URL, broadcasting an Android intent, starting an app, changing the sound profile and running tasks via Tasker in response to detecting or losing a beacon signal.

What’s especially interesting about this app is that it’s open source allowing you to extend it to a multitude of personal and business scenarios.

Using Beacons For a Library Tour

There’s an interesting article at code4lib on Creation of a Library Tour Application for Mobile Equipment using iBeacon Technology by Virginia Tech. It describes a project where a QR code driven library tour was updated to use beacons.

Some insights include how attractive beacons can become ‘lost’, the problem of replacing batteries, limited battery life due to the iOS requirement for beacons to advertise every 100ms and challenges physically fixing beacons.

As mentioned in our article on Choosing an Advertising Interval, it’s possible to set the advertising interval to between 300ms and 600ms while maintaining a reasonable detection time. Also, had the library chosen Android tablets they could have used a much longer advertising interval. 100ms is an artificial thing set by Apple for very quick detection on iOS devices. On Android, the scanning is more controllable,you can scan for longer and hence have beacons that advertise less often and have much longer battery life.

nRF Connect Now Has Macros

The Nordic nRF Connect app (formerly known as nRF Master Control Panel) allows you to manipulate beacons directly at the Bluetooth GATT Service/Characteristic level. It works with all beacons, not just those containing Nordic SoCs. There’s also a version for iOS. The app is particularly good at recognising known Bluetooth profiles and giving them useful human descriptions rather than leaving the Bluetooth Services as numbers.

The Android version of the app has recently been updated to support macros:

nrfconnectmacros

This means that if you are configuring lots of beacons, it’s now much less tedious, quicker and less error prone if you record and replay a macro setting all your desired Service/Characteristic settings.

New Tally App

We have just announced our new Tally app that can be used to monitor people or things that have beacons attached to them. It’s suitable for counting groups of people, for example, tour groups and educational classes or finding the wareabouts of things such as stock items, machines or vehicles. It’s also suitable for lone workers and evidence based working.

The app is csv driven in that you can import and export beacons of interest with given names and groups. You can then start/stop monitoring sessions on all beacons, all beacons declared in the app or just beacons in a named group. The results make up sessions of detected beacons that can, again, be exported to csv files. You can also choose to add arbitrary (prompted for) information to a session, for example a description of the location, that you might later use for analysis.

seeking

The power of the app comes from the fact it works in background and can also work unattended, stopping and starting sessions automatically during idle time when detected the beacons haven’t changed. The resulting session csv files can be automatically sent via email or ftp, with queuing for failed sends.

configuration

Here are some examples of how Tally can be used:

Managing Tour Groups: You might set up an Excel file with named grouped members that’s imported into the app. Give each a beacon and set the app to show those beacons that are missing. Start a session and the app will give you the names of those people missing.

Class Registration: Give each student a beacon. Import the student names from Excel and/or dynamically add the named students one by one by allowing the app to add the nearest beacon. Set the app to automatic sessions and email sending. The app will regularly report who is in the room. The app will also send the group if this has been set for the student.

Managing Stock: Put beacons on large or valuable stock items. Import the items from Excel or add manually in the app auto-filling the beacon uuid, major and minor for the closest beacon. Set the app to prompt for extra information at the start of a session. When you need to do a stock check, start a session, enter the room name or area and walk around the room. Stop the session and export the detected beacons. You might also set the minimum signal strength for detection so as to filter out beacons in adjacent rooms.

Evidence Based Working: Some jobs require workers to prove they have been at a particular place at a particular time. Site beacons at the places that need to be visited. Import the named place details and/or set them manually in the app (you can also export this data). Set the app to unattended use and FTP upload and give to the worker. You will receive where the worker has been, with named locations via FTP.

Testing Beacons: Some rollouts, for example at museums, need to regularly walk-test the routes to make sure the beacons are working and battery strength is sufficient. Set the app to detect all beacons and enable the battery monitoring. Walk the museum and all the beacons, with their battery levels will be recorded for the session. Export to Excel, send via email or share the output session file.

Learn more about Tally