How to create an app using a smartphone’s location

In the last decade, smartphones and other mobile devices have changed the way we communicate with each other. Smartphone users are increasingly using social media apps to exchange short messages, photos, videos and recorded audio. The next few years will see users’ apps sensing and connecting to read data from billboards, vending machines, and other devices.   The arrival of iBeacon looks set to accelerate this trend.

Several years ago, the QR code system was adapted from the automotive industry to store information of physical items such as document, products in a superstore, airline tickets, etc. Due to the popularity of QR codes, smartphone apps were built to scan these codes and display information stored in the codes. Adoption of the QR code system faltered, in part as a result of security and privacy concerns raised when malicious commands were found embedded in some of these early apps.


The Radio-Frequency identification (RFID) is commonly used to tag and identify physical items. RFID tags can be concealed in consumer products (for example, inside wrappers, book covers, and passports) and scanned with a reader, even where the RFID is not visible. This provides an additional level of security, compared with QR codes. Encouraged by the popularity of RFID, Near Field Communication (popularly known as NFC) was developed specifically for smartphones and other mobile devices. Unlike QR codes & RFID, NFC allows two-way communications between a NFC tag and a smartphone when they are placed close to each other. A NFC tag can be written only once or several times. The main advantage of NFC technology over QR code & RFID is that it supports the encryption of data. This has made NFC the technology of choice for implementing contact-less payments and other applications that have security as their primary requirement.

With the critical exception of Apple’s iPhones and iPads, most smartphone producers introduced support for NFC in their handsets in 2011. Google provides support for NFC in Android and has created and promotes a NFC payment service – Google Wallet. BlackBerry supports NFC through BlackBerry tag on a number of handsets running BlackBerry OS 7.0 or greater. Microsoft added NFC support in Windows Phone 8 and Windows 8 OS. Nokia and HTC include NFC support in their Windows Phones.

Google Wallet uses NFC for accepting payments using Android smartphones

Google Wallet uses NFC for accepting payments using Android smartphones

(Courtsey: The Verge)

Bluetooth Low Energy – The NFC Killer?

Whilst NFC has enjoyed popularity and adoption in various industries and spawned a number of quite successful apps, the lack of support in Apples’ iPhone and iPad is a very real and present danger for it. Apples’ devices support Bluetooth, a technology that allows exchange of data over short distances and which has been around for well over a decade. Bluetooth was developed to replace traditional (wired) data communications over a serial port connection between two devices. Whilst it offers fast transfer of data, it’s main disadvantage with NFC is that the 2 devices need to be paired with each other (device pairing is required for identification). NFC also consumes less power than traditional Bluetooth technology.

In 2007, Bluetooth Smart (since more commonly known as Bluetooth Low Energy or BLE) was developed and introduced with Bluetooth version 4.0. BLE maintained the same communications range as the traditional Bluetooth technology, critically power consumption and cost to implement were both reduced significantly. Apple’s iPhone 4S was the first device to implement Bluetooth 4.0 in 2011. Google added support for Bluetooth 4.0 in their Android 4.3 OS.

Bluetooth support in Apple iOS

Bluetooth support in Apple iOS

(Courtsey: The Apple Press) 

A recent innovative product called Tile uses a Bluetooth 4.0  beacon embedded in a small package that you can attach with a key or stick in your bag. The Tile tracks your tagged item with a unique code. If your tracked item is lost or stolen, you can mark the Tile as lost. If a stranger with a smartphone comes within range of your item/Tile, the Tile app on your iPhone gets notified with the location of the lost item marked on a map.  Tiles cannot be recharged, instead their business model relies on users buying a new, replacement Tile after a year when the battery life is exhausted.


In iOS 7, Apple introduced a new way to interact with other smartphones and sensors using a technology it has called iBeacons.   Apple devices such as the iPhone 4S or later, iPod Touch 5th generation, iPad 3 or later and the iPad mini running iOS 7 can function as an iBeacon. Developers and entrepreneurs can create devices compatible with the iBeacon protocol. This includes manufacturers that produce embedded hardware devices. These devices are likely to be installed in shopping centres, public facilities, and other locations. Some potential applications of iBeacons are:

  • to send advertising and marketing campaigns to a user’s phone when they are near a particular product or a section in a super or department store.
  • A checkout in a superstore can prepare and display the customers’ purchases as they approach the counter.
  • Smartphone users pay for their purchases by tapping their phone on the checkout counter.
  • Airlines, bus and train companies can display the latest information of the traveller’s planned journey and destination such as their arrival time, weather, etc.
  • A museum can provide information through a smartphone app about exhibits near a visitor when they are walking around the galleries.
  • Indoor mapping of large shopping centres and other public facilities.
Usage of iBeacons in retail outlets and shopping centres

Usage of iBeacons in retail outlets and shopping centres

(Courtsey: Estimote)

iBeacons can be used to detect changes in the location of a device. Developers are able to use events that notify the device when it is in range or out of range of an iBeacon. An iBeacon can transmit information specific to a location in a large facility such as special offers or recommendations based on purchases in the past, or even within a few hundred metre radius of that location. Estimote is already trialling their beacons with some retailers in the US and Europe. Estimote’s beacons consist of a powerful ARM microprocessor and a Bluetooth 4.0 interface. An Estimote beacon runs on batteries that are expected to last up to two years.

Estimote beacons are available for pre-order

Estimote beacons are available for pre-order

(Courtsey: Estimote)

PayPal recently announced a new contact-less payments service called Beacon. Beacon utilises a Bluetooth connection to detect if people are using a smartphone and have a PayPal account. Merchants use a special Bluetooth USB dongle that plugs into the point of sale terminals. Smartphone users can use their PayPal account to pay for their purchases when they are at the checkout.

Bluetooth LE – The future?

With the introduction of iBeacons in iOS 7, Apple has ignited the interest in hardware vendors and retailers to adopt Bluetooth LE based beacons. Although NFC and other technologies are already being used in a variety of applications, it is clear that Bluetooth Low Energy provides a cheap and simple way to introduce value-added services to smartphone users. Crucially, Bluetooth LE is available on the most recent Apple and Android devices.

In the next few years, Bluetooth will be used to provide mapping and geolocation services indoors, advertising and loyalty programmes, ticketing services and much more. Apple and Google have already introduced support for Bluetooth Low Energy in their operating systems and it is likely that other smartphone vendors will add support for BLE in their forthcoming releases.

If you’re interested in learning more about how to create an app, then you should join AppInstruct’s online Course.


Indrajit Chakrabarty

Indrajit Chakrabarty wrote on

Indy is a co-founder of AppInstruct. He is an experienced systems architect and software engineer, with a Masters in Computational Physics. Indy recently wrote Microsoft's textbook in support of Windows 8 – “Essentials of Developing Windows Store Apps Using C#”. His favorite apps are the ones he creates in his spare time to support the Internet of Things!