4. The Future!
“Wearables and connectables will herald a fast-changing local
network of customer context. Devices worn on or near the body
that sense and relay information will be embedded in clothing,
accessories, and even the body itself.17 First-generation
wearables like the Nike+ FuelBand and Fitbit will give way to
internal biomedical instruments, shoes that generate power to
recharge devices, and golf clubs that provide swing telemetry.
Connectable home alarm systems, automobiles, and scales will
function in a similar way. Developers will tap into these new
information sources, with a phone or tablet acting as a local
combination of router and remote-control device. Client-side
developers will release updates faster than ever to dynamically add
support for new devices in the extended local network.”
4
Source: Forrester Research Inc.: “The Future of Mobile Application Development” 2013
5. Imagine!!
Ÿ Your home anticipates your arrival since it’s in
contact with your smart phone
Ÿ On arriving home you unlock your door using
your smart phone
5
Ÿ Lights and heating are automatically adapted when rooms
detect that they are occupied.
Ÿ Control and manage household services such as heating,
lighting, blinds, security, entertainment and data
Ÿ Lights and heating automatically turn down when rooms
are vacated and everything can be switched off with one
button on leaving.
7. Potential Experience: Fitness
Ÿ Fitness app connects to running shoes via Bluetooth LE
Ÿ Notification received in Hub via Push from a Fitness BBM
Channel
„ “Flash Special: Log a 5km+ run in the next 24 hours and get 20% off your
next purchase online”
Ÿ Your run is tracked and analyzed using Bluetooth LE and LBS
Ÿ Fitness app’s Scoreloop integration notifies user
„ “You’re in 2nd place this week at 21km total! 4km more and you’ll be on
top of the leaderboard”
Ÿ Achievement gets posted via Share to social media and with
BBM trophy avatar
Ÿ Minimized app motivates you to run more (Active Frames):
„ “4km more and you’ll be the winner”
7
8. Other Potential Experiences!
Ÿ Sports equipment
with sensors –
how about this
Basketball?
8
Ÿ Location aware beacons
Ÿ Indoor Navigation (e.g.
Museum Tour)
Ÿ In-store marketing/
payment
9. Limited only by ...
Ÿ ... your imagination
Ÿ BlackBerry 10 has all the
capabilities you need to start
exploring this area as a
developer
Ÿ Let’s take a look in more detail
9
11. What can I do with NFC?
Ÿ Enable users to interact securely and efficiently with their environment
Ÿ Tap to share; Tap to pair; Tap to pay; Tap to access; Tap to…
Ÿ Smart Tags: Tags can give the user information or automate common tasks
„ Tag reading and writing is supported
Ÿ Tag Emulation: Tag functionality can also be replicated by the phone’s NFC antenna
Ÿ Ticketing and Access: Allow users to gain access to workplaces, secure areas,
theatres, events, trains, buses etc.
„ BlackBerry - first phones to be HID-enabled, replacing security access badges
Ÿ Data Exchange: Exchange pictures, messages or electronic items between devices
„ Automatically configure/connect devices by tapping them together
11
13. 13
• Peer-to-peer Wi-Fi connection without the need for wireless access points
(APs)
• Typically short-lived, application-controlled connections for a specific
purpose
• One device acts as Wi-Fi Direct Group Owner (GO) others are Group Clients
• Backward compatible with existing Wi-Fi devices (GO looks like an AP to
legacy devices)
• Security is WPA2 Personal using Wi-Fi Protected Setup: Push Button or PIN-
based
• Simply establishes an IP connection on which services can run
• & Share)
Wi-Fi Direct – What is it?
14. 14
• BlackBerry Tag NFC-initiated file transfer uses Direct
for faster performance
• File sharing also offers Wi-Fi Direct
• Mobile Hotspot operates as Wi-Fi Direct Group Owner
• Saves battery when all clients are Direct-capable
• DEMO!
Wi-Fi Direct – Use Cases
16. Bluetooth Low Energy Basics
16
Op)mised
for
ultra
low
power
• Different
from
Classic
Bluetooth
(Headsets,
Serial
Port,
...
)
• Smarter,
more
Efficient,
rather
than
Faster
• Powered
by
small
buIon
cells
like
this
• Perfect
for
devices
like
sensors
(Heart
Rate
Monitors,
Wearable
technology,
..)
• An
enabler
for
the
Internet
of
Things
18. Bluetooth LE devices interaction
Advertiser
Slave
Master /
Scanner
Scanner
Slave
Slave
Advertiser
Advertiser
Advertises
Advertises
Advertises
Advertises
Connection
Connection
Connection
Various
Roles
• Adver%ser
• “Here
I
am!”
• Scanner
• “Who’s
there?”
• Ini%ator
• “Can
I
connect
to
you?”
• Master
• “I’m
in
charge!”
• Slave
• “I’ll
respond
to
requests!”
19. Bluetooth Low Energy Services
Use Case
Use Case
Use Case
Characteristic
Characteristic
Characteristic
Characteristic
Request
Response
GATT Client GATT Server
Service
Service
...
...
Indication
Notification
Acknowledgement
Applica)ons
use
this
model
• As
a
Developer
you
will
work
with
services
• Services
• Client
• Make
requests
• Interact
with
Characteris)cs
• Server
• Responds
to
requests
• Manage
Characteris)cs
• Can
also
send
events
called
• Indica%ons
• No%fica%ons
...
...
20. Characteristics
Primary Service <<GAP>>
Primary Service <<GATT>>
Primary Service <<Temperature>>
<<Device Name>> “XYZ Thermometer”
<<Appearance>> <<Thermometer>>
<<Attribute Opcodes Supported>> 0x03fdf
<<Temperature Celsius>> 0x0801
(Note: by specification 0x0801 = 2049 * 0.01 deg C = 20.49 C )
More
than
just
numbers
or
strings
• Uniquely
universally
iden)fied
• UUIDs
(16-‐
or
128-‐bits)
• Registered
by
Bluetooth
SIG
• Used
to
• Iden)fy
device
(GAP)
• Describe
capabili)es
(GATT)
• Applica)on
aIributes
• Permissions
• Have
associate
scale
(
e.g.
)
• Temp
(Celsius,
Kelvin
etc)
• Pressure
(
mmHg,
Nm-‐2)
24. Coding Recipe - High Level
24
INITIALISATION
DEVICE
DISCOVERY
AND
SELECTION
MONITOR
25. Coding Recipe - Initialisation
25
• bt_device_init
• ini)alise
the
Bluetooth
device
and
library
• bt_ldev_set_power
• switch
the
Bluetooth
radio
on
• bt_ga@_init
• specify
call
back
func)ons
for
GATT
events
Ini)alisa)on
26. Coding Recipe - Device
Discovery
26
• bt_disc_start_inquiry
• start
scanning
for
Bluetooth
devices
• delay(5)
• bt_disc_cancel_inquiry
• we’ve
waited
long
enough
so
cancel
the
scan
• bt_disc_retrieve_devices
• retrieve
list
of
Bluetooth
devices
that
are
within
range
• bt_rdev_get_type
• check
devices
for
being
LE
devices.
Disregard
those
that
are
not.
• bt_rdev_get_services_ga@
• examine
services
supported
by
each
found
device
and
filter
those
that
do
not
support
the
service
we
need
Device
Discovery
and
Selec)on
27. Coding Recipe - Monitoring #1
27
• bt_ga@_connect_service
• connect
to
the
heart
rate
service
on
the
selected
device
• ga@_service_connected
• your
call
back
func)on,
called
when
connec)on
to
the
selected
service
is
achieved
• bt_ga@_reg_no%fica%ons
• register
for
GATT
no)fica)ons
from
the
service
we
connected
to
• bt_ga@_enable_no%fy
• indicate
the
specific
characteris)cs
we
want
to
receive
no)fica)ons
for
• no%fica%ons_cb
• your
call
back
func)on.
Receive
a
no)fica)on
for
a
characteris)c
of
interest
here
Monitoring
28. Coding Recipe - Monitoring #2
28
• bt_ga@_characteris%cs_count
• Find
out
how
many
characteris)cs
this
service
offers
• bt_ga@_characteris%cs
• Obtain
a
list
of
the
service’s
supported
characteris)cs
• bt_ga@_enable_no%fy
• Enable
no)fica)ons
for
a
selected
characteris)c
Register
for
GATT
no)fica)ons
29. Bizarre Apps – Heart Monitor
29
Ÿ Two of my crazy
colleagues from
London took this
one step further
Ÿ Control a music
track using your
heart rate
Ÿ Let’s give that a
go here!!!!!!!
Ÿ Ran???? Don (@donturner) and Luca (@blackberryluca) in their Bizarre
Apps Laboratory deep underground the UK Technical Centre
31. How can I find out more?
31
• Code
• Full
source
code
available
on
Git
Hub
hIps://github.com/blackberry/Cascades-‐Community-‐Samples
• Ar%cle
• A
more
detailed
Ar)cle
is
available
on
the
Support
Forums
hIp://supporgorums.blackberry.com
• Contact
us
if
you
have
ques%ons
• TwiIer
• John
Murray
@jcmrim
• Mar)n
Woolley
@mdwrim
• Ranbijay
Kumar
@ranbijay
Resources