Workshop: Building location-aware mobile apps with iBeacons
-
Upload
quorralyne -
Category
Software
-
view
146 -
download
1
Transcript of Workshop: Building location-aware mobile apps with iBeacons
Building Location-Aware Mobile Apps with iBeaconsHeather Downing
Heather Downing
slideshare.net/quorralyne
github.com/quorralyne
www.quorralyne.comDigitalLightCycle.blogspot.com
About Me
I’m passionate about building great products that make people’s lives easier. I have experience developing full stack projects for small startups to Fortune 500 companies.
I grew up in California, am an avid horse archer, and completely obsessed with Lord of the Rings, Star Trek and guacamole.
Skills & expertise
ASP.NETMobile
DevelopmentSQL HTML,
CSS,JS
What is iBeacon?
iBeacon is an Apple trademarked transmission protocol used to communicate between Bluetooth LE beacons and any Apple device.
It allows developers to create mobile apps aware of location context provided by beacons.
https://developer.apple.com/ibeacon/Official Site
What is Bluetooth Low Energy?
Classic Bluetooth requires pairing which drains battery life
BLE does not pair which means longer battery life
What devices can see iBeacon broadcasts?
Apple devices running iOS 8+
Bluetooth 4.0 devices that support dual mode, which includes Android and Windows devices.
How have beacons been used?
Guided Museum Tour
Shopping Rewards Experience
What is the anatomy of a beacon?
iBeacon identifier
Every iBeacon ID is 20 bytes long and is divided into three sections:
● UUID (16 bytes)
● Major number (2 bytes)
● Minor number (2 bytes)
Broadcasting Power (Loudness)
This directly impacts signal range. The more power, the longer the range. The value ranges depend on the manufacturer, but roughly this what you expect:
Whisper: -23 dBm
Mutter: -20 dBm
Talk: -17 dBm
Shout: -10 dBm
Scream: 0 dBm
Advertising Interval
Beacons do not broadcast constantly. They ‘blink’ instead. Advertising Interval describes the time between each blink.
The value ranges between 100 ms and 2000 ms.
Keep in mind that adjusting Advertising Interval will impact battery life in a big way.
The shorter the interval, the more stable the signal.
RSSI (Received Signal Strength Indicator)
The strength of the beacon's signal as seen on the receiving device, such as a smartphone.
The further away the device is from the beacon, the more unstable the RSSI becomes.
Due to external factors influencing radio waves—such as absorption, interference, or diffraction—RSSI tends to fluctuate.
Measured Power
Measured Power is a factory-calibrated, read-only constant which indicates what's the expected RSSI at a distance of 1 meter to the beacon.
Combined with RSSI, it allows to estimate the distance between the device and the beacon.
What does an iBeacon broadcast packet look like?
Region monitoring
Region monitoring
Actions triggered on entering/exiting region’s range
Works no matter whether the app is running, suspended, or killed
If the app is not running when an enter/exit even comes, iOS will launch it into the background for a few seconds to handle the event
Region monitoring
Limitations
iOS limits the number of regions an app can be monitoring at once to 20
It only recognizes enter/exit events, and provides no information about which exact beacon triggered the event
It's not as responsive as ranging. Whereas ranging reports changes in beacons detected in range within seconds, monitoring's responsiveness varies as a result of using low-power scanning.
Exit event is always delayed at least 30 seconds, to avoid false positives
LAB 1CLOSEST BEACON : iOS
BREAK - resume at 9am
How precise are beacons?
What are the characteristics of beacon's signal?
There’s a handful of terms that will help you better understand how beacons work. Most of them describe signal characteristics and the way beacons communicate with mobile devices:
● Proximity Zones
● Broadcasting Power
● Advertising Interval
● RSSI
● Measured Power
Proximity zones
iBeacon defines four proximity zones for estimating distance to a beacon:
● Immediate (very close to the beacon)
● Near (about 1-3 m from the beacon)
● Far (further away or the signal is fluctuating too much to make an estimate)
● Unknown
Keep in mind that the zones are fixed.You cannot adjust their size or sensitivity.
Ranging
Ranging
Actions triggered based on proximity to a beacon
Works only when the app is running (e.g., it's displayed on screen, or running in the background in response to a monitoring event, etc.)
It returns a list of beacons in range, together with an estimated proximity to each of them.
RangingLimitations
Power consumption is high and could have performance implications
iOS only allows background ranging for short periods of time (3 minutes)
If you’re planning to use the "location" background mode to do long-term ranging without a major user benefit (for example just to track user’s movements for your analytics—i.e., you're the beneficiary, not the user), you will most certainly have your app rejected by Apple for the App Store.
Does iBeacon work on Android?
YES!*Android version 4.3+
*Android device must have a Bluetooth LE chipset
*Need a third party library bundled with your app or you need to roll your own code to decode Bluetooth LE advertisements to read beacon identifiers
Android Works with iBeacon
Android devices do not have a beacon system of this type at the operating-system level.
Android apps must therefore scan for BLE, meaning that for Android users to interact with beacons, they have to have the app running on their phone, at least in the background.
Beacon scanning at the app level means there is more of a battery drain for Android users.
Monitoring People
LAB 2BEACON PROXIMITY: Android
BREAK - resume at 10am
GUEST SPEAKER:Lyndsey Padget
LAB 3STORING BEACON DATA: RESTful API
BREAK - resume at 11am
Best Practices
Use them for what they do best
Use them for what they do best
Good at proximity gating
Use them for what they do best
Good at proximity gating
Don’t be overly ambitious about accuracy
Use them for what they do best
Good at proximity gating
Don’t be overly ambitious about accuracy
Best for signal strength under 25ft
Use brands that provide cloud management
Use brands that provide cloud management
Monitor battery life
Use brands that provide cloud management
Monitor battery life
Plan on the ability to swap out battery power at any time
Use brands that provide cloud management
Monitor battery life
Plan on the ability to swap out battery power at any time
Adjust signal strength remotely
Keep things simple to produce consistency
Keep things simple to produce consistency
Focus on a flow that makes sense and can be reliable and repeatable
Keep things simple to produce consistency
Focus on a flow that makes sense and can be reliable and repeatable
Consider environmental factors that can disrupt line of sight
Keep things simple to produce consistency
Focus on a flow that makes sense and can be reliable and repeatable
Consider environmental factors that can disrupt line of sight
Test in a room full of people
LAB 4BUILDING A SCAVENGER HUNT: iOS
Questions?
Stay curious.
slideshare.net/quorralyne
github.com/quorralyne
Heather Downing@quorralyne
DigitalLightCycle.blogspot.com