Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Proximity Beacons and the Nearby API

Dave Smith
November 03, 2015

Proximity Beacons and the Nearby API

Walkthrough of using Google's Proximity Beacon API to provision and manage BLE beacons, coupling that with the client-side Nearby Messages API to enhance beacon message contents.

Dave Smith

November 03, 2015
Tweet

More Decks by Dave Smith

Other Decks in Programming

Transcript

  1. ENHANCING BEACON APPLICATIONS WITH GOOGLE AND NEARBY DAVE SMITH, PE

    ANDROID LEAD, NEWCIRCLE @DEVUNWIRED • +DAVESMITHDEV
  2. METADATA PLACE ID LAT/LNG INDOOR LEVEL BEACON ADVERTISED ID STABILITY

    PROPERTIES LOCATION ATTACHMENT NAME NAMESPACED TYPE DATA
  3. METADATA PLACE ID LAT/LNG INDOOR LEVEL BEACON ADVERTISED ID STABILITY

    PROPERTIES LOCATION BASE64 ENCODED BLOB ATTACHMENT NAME NAMESPACED TYPE DATA
  4. MessageListener mMessageListener = new MessageListener() {
 // Called each time

    a new message is discovered nearby.
 @Override
 public void onFound(Message message) {
 Log.i(TAG, "Found message: " + message);
 }
 
 // Called when the publisher (beacon) is no longer nearby.
 @Override
 public void onLost(Message message) {
 Log.i(TAG, "Lost message: " + message);
 }
 };
  5. MessageListener mMessageListener = new MessageListener() {
 // Called each time

    a new message is discovered nearby.
 @Override
 public void onFound(Message message) {
 Log.i(TAG, "Found message: " + message);
 }
 
 // Called when the publisher (beacon) is no longer nearby.
 @Override
 public void onLost(Message message) {
 Log.i(TAG, "Lost message: " + message);
 }
 }; CALLBACKS NOT ON MAIN THREAD
  6. MORE RESOURCES ▸ Beacon API Docs ▸ https://developers.google.com/beacons/proximity/guides ▸ Nearby

    Messages Docs ▸ https://developers.google.com/nearby/messages/overview ▸ Proximity Beacons Series ▸ Video: Eddystone Beacon Format ▸ https://newcircle.com/s/tags/beacons ▸ Sample Code ▸ http://milehighandroid.com/