Hi.
My name is Marc Wandschneider, and I'm a software engineer
here at Google.
I'd like to take a moment to talk to you today
about using the Nearby Messages API and beacons.
Nearby Messages is a new API that enables your device
to react to nearby objects and microlocations,
such as bus stops, train platforms,
or even indoor locations such as exhibits in a museum.
It makes use of a whole host of technologies,
including Wi-Fi, Bluetooth, audio,
and most interestingly for us today,
Bluetooth beacons powered by Eddystone.
Now, for more information on the whole beacon platform,
check out our video Developing with Beacons.
However, here are a few quick reminders.
This is a beacon, as is this, as is this, this,
and all of these.
In the most simple of terms, beacons
are little Bluetooth Low Energy, or BLE,
devices that sit around yelling loudly-- well, if radio waves
could yell-- that they're here.
And that's it.
There's just this little guy saying I'm beacon 12345,
and this one saying I'm beacon 54321.
There's typically a little battery in them,
and they'll broadcast that information one to ten times
a second.
Now your mobile phone, or tablet, or laptop,
if it chooses, can scan for these devices
and use whatever it knows about those beacons when it sees one.
And that's the catch.
Beacon 12345 isn't necessarily super interesting by itself.
It's far more interesting, or far more useful,
if I know that beacon 12345 is sitting on my desk in London
on Buckingham Palace road.
But BLE devices can't really communicate
that much information.
Again, all they can really do is say, hi, I'm beacon 246810.
To get past this, we have to register some data to associate
or store with this beacon so that when we see it,
we can fetch the data associated with it
and use it for whatever we want, like identifying our bus stop.
Not unexpectedly, since I'm up here recording this video,
we have a solution that does exactly
this: the Nearby Messages API.
Once it sees a beacon and determines
that it's one of yours, it will fetch the data for it
and return that information to your app.
Let's look at how that works.
First, we have a beacon sitting around announcing its presence
to, well, anybody who's listening.
Next you walk past with your mobile device running an app
using Nearby Messages, and it sees that beacon.
Nearby Messages then goes to the server
to see if it knows about that beacon,
and any information about that is returned to your app.
If the beacon is one you know about,
the app can start to use that information.
Getting started with the Nearby Messages API
and your beacons does have a few steps,
but fortunately they're all pretty straightforward.
So we'll walk through those now.
First, you need some beacons.
Eddystone is an open format, and anybody
can support in their beacon hardware,
so you have lots of choices when you choose from whom to buy.
Make sure the ones you're purchasing
support the Eddystone format for maximal interoperability.
And then you can work with a vendor
to address other things, like battery life, weather
conditions, and broadcast frequency.
Second, provision and register the beacons.
This will be a combination of using the beacon
vendors provisioning applications to activate
the beacon and configure just how often it broadcasts
and at what signal strength.
And then you'll need to register some data with the Proximity
Beacon API for that beacon.
This register data is what the Nearby Messages
API will return to you when it sees one of your beacons.
To help you use the Proximity Beacon API to register data
for your beacons, there's a website with documentation
as well as a GitHub repository with a sample app
to show you how it's done.
Finally, you integrate the Nearby Messages API
into your application to start looking for those beacons
that you provisioned and registered.
This is known as subscribing to messages for those beacons.
So on Android you'll set up the subscription for those messages
by using the message filter class
and adding Eddystone device filters.
This message filter forms part of your subscription options
that you then pass to nearby .messages .subscribe.
For iOS it's going to be quite similar.
You'll be working with a DNS strategy object and telling it
you want beacon messages.
And then you set up the subscription to those messages.
But really, rather than bore you to death
here with screenshots of IDEs, and websites,
and documentation, and code, I'm going
to point you at the excellent Getting Started
page, along with samples and other documentation,
for the Nearby Messages API.
Using Nearby Messages together with beacons
allows you to open up a whole new world of context
sensitivity in your apps.
Let's take a quick look at some of places
you can go for more information about what
I've talked about today.
For information on using beacons,
such as Eddystones in general, visit
developers.google.com/beacons.
For nearby and the Nearby Messages API,
visit developers.android.com/nearby
and developers.andro id.com/nearby/messages.
Now, for the registering data part of working with beacons,
you'll use the Proxy Beacon API, and you can get more
information at developers.googl e.com/beacons/proximity as well
as checking out our GitHub repository
at github.com/google/eddystone.
We've got a bunch of sample apps there
that have both iOS and Android versions for maximal choice
and will hopefully get you started
doing a lot of cool things.
So I hope this video has helped you
learn how to go about using the Nearby Messages
API, along with your beacons, and pointed you
in the right direction.
I certainly had fun making it.
[MUSIC PLAYING]