1 / 32

Building a Mobile Location Aware System with Beacons

Audio from talk (OSCON - July 22nd, 2015): https://archive.org/details/oscon_mobile_location_aware_systems_with_beacons What if instead of a broad location, you could have pinpoint location awareness of someone in a physical space. How could this change everything about how we interact with the physical world? In this session we will be exploring Beacon technology, which enables this, the underlying Bluetooth Smart standard, and how we can use these systems to change everything from shopping, to accessibility for the disabled, all built on top of a mobile device.

jcleblanc
Download Presentation

Building a Mobile Location Aware System with Beacons

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building a Mobile Location Aware System with Beacons Jonathan LeBlanc (@jcleblanc) Head of Global Developer Advocacy at PayPal + Braintree

  2. Purpose of a Beacon twitter: @jcleblanc | hashtag: #OSCON

  3. Being Location Aware twitter: @jcleblanc | hashtag: #OSCON

  4. Real World Use Case twitter: @jcleblanc | hashtag: #OSCON

  5. How it Works Central Device Beacon Hardware IP Address Endpoint twitter: @jcleblanc | hashtag: #OSCON

  6. Beacon Comparison Estimote: $99 / 3, temp + motion Bluecat: Trial, AA batteries Gimbal Tag: $5, small & deployable Kontakt.io: $81 / 3, battery life twitter: @jcleblanc | hashtag: #OSCON

  7. Beacon Advertisement & ID •  UUID (16 bytes): Differentiates Large Group •  Major (2 bytes): Beacon Subset •  Minor (2 bytes): Individual Beacon •  Tx Power: Proximity from beacon twitter: @jcleblanc | hashtag: #OSCON

  8. Don’t be Creepy twitter: @jcleblanc | hashtag: #OSCON

  9. Deploy Considerations twitter: @jcleblanc | hashtag: #OSCON

  10. Battery Life vs Range twitter: @jcleblanc | hashtag: #OSCON

  11. Battery Replacement twitter: @jcleblanc | hashtag: #OSCON

  12. Signal Interference twitter: @jcleblanc | hashtag: #OSCON

  13. •  Microwave ovens •  Direct Satellite Service (DSS) •  Certain external electrical sources •  2.4 GHz or 5 GHz phones •  Video transmitters/receivers that operate in the 2.4 GHz or 5 GHz bandwidth •  Wireless speakers that operate in the 2.4 GHz or 5 GHz band •  Certain external monitors and LCD displays •  Any other wireless devices that operate in the 2.4 GHz or 5 GHz bandwidth twitter: @jcleblanc | hashtag: #OSCON

  14. Signal Degradation twitter: @jcleblanc | hashtag: #OSCON

  15. Low Interference Medium Interference Water Wood Bricks Synthetic Material Marble   Glass   High Interference Very High Interference Plaster Concrete Metal   Bulletproof Glass  

  16. Attaching to a Beacon twitter: @jcleblanc | hashtag: #OSCON

  17. AndroidManifest.xml <uses-permission android:name= "android.permission.BLUETOOTH"/> <uses-permission android:name= "android.permission.BLUETOOTH_ADMIN"/> <service android:name= ”com.estimote.sdk.service.BeaconService" android:exported="false"/> twitter: @jcleblanc | hashtag: #OSCON

  18. Adjusting Beacon Settings Estimote Site and App twitter: @jcleblanc | hashtag: #OSCON

  19. The Beacon Connection connection = new BeaconConnection(this, beacon, new BeaconConnection.ConnectionCallback(){ @Override public void onAuthenticated(){ ... } @Override public void onAuthenticationError(){ ... } @Override public void onDisconnected(){ ... } }); connection.authenticate(); connection.close(); twitter: @jcleblanc | hashtag: #OSCON

  20. Adjusting Beacon Settings //update the beacon UUID and Major connection.edit() .set(connection.major(), newMajor) .commit(new BeaconConnection.WriteCallback(){ @Override public void onSuccess(){} @Override public void onError(EstimoteDeviceException exception){} }); twitter: @jcleblanc | hashtag: #OSCON

  21. Updatable Settings •  AdvertisingInterval •  BroadcastingPower •  Major •  Minor •  ProximityUuid twitter: @jcleblanc | hashtag: #OSCON

  22. The Android Emulator twitter: @jcleblanc | hashtag: #OSCON

  23. Emulating Android & BLE Virtual Machine Software + USB BLE adapter http://chrislarson.me/blog/ emulate-android-and-bluetooth- le-hardware.html twitter: @jcleblanc | hashtag: #OSCON

  24. Collecting Range Data twitter: @jcleblanc | hashtag: #OSCON

  25. The Beacon Object •  getProximityUUID: Proximity UUID of the Beacon •  getMajor: Major version of the beacon •  getMinor: Minor version of the beacon •  getMeasuredPower: Beacon measured power (in dBm) •  getMacAddress: Beacon MAC address •  getName: Display friendly beacon name •  getRssi: Received Signal Strength Indication twitter: @jcleblanc | hashtag: #OSCON

  26. Setting the Beacon Manager private static final Region ALL_BEACONS = new Region("regionId", null, null, null); private BeaconManager beaconManager = new BeaconManager(this); twitter: @jcleblanc | hashtag: #OSCON

  27. Setting the Listener beaconManager.setRangingListener(new BeaconManager.RangingListener() { @Override public void onBeaconsDiscovered(Region region, List<Beacon> beacons) { for (Beacon rangedBeacon : beacons) { double currentDistance = Utils.computeAccuracy(rangedBeacon); … } } }); twitter: @jcleblanc | hashtag: #OSCON

  28. Getting Beacon Range beaconManager.connect( new BeaconManager.ServiceReadyCallback(){ @Override public void onServiceReady(){ try{ beaconManager.startRanging(ALL_BEACONS); } catch (RemoteException e) { Log.e(TAG, "Cannot start ranging", e); } } }); twitter: @jcleblanc | hashtag: #OSCON

  29. iBeacon Specification https://developer.apple.com/ibeacon/ Estimote Javadocs http://estimote.github.io/Android- SDK/JavaDocs/ AltBeacon http://altbeacon.org/examples/ twitter: @jcleblanc | hashtag: #OSCON

  30. Beacon Wrap-up twitter: @jcleblanc | hashtag: #OSCON

  31. Thank You! http://slideshare.net/jcleblanc Jonathan LeBlanc (@jcleblanc) Head of Global Developer Advocacy at PayPal + Braintree

More Related