Slide 1

Slide 1 text

Google Beacons and The Physical Web Dave Smith, PE • NewCircle, Inc. @devunwired +DaveSmithDev

Slide 2

Slide 2 text

What is a Beacon? ~31b

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

1A FF … … UUID (16 bytes) Major Minor TX <> 100ms

Slide 5

Slide 5 text

… 16 FEAA 00 TX Namespace ID (10 bytes) Instance ID (6 bytes) <> <> 03 03 FEAA ~1-2s UID … 16 FEAA 10 TX Encoded URL (up to 18 bytes) URL

Slide 6

Slide 6 text

Eddystone-UID sha1(newcircle.com)X=X442560da34bd204a9ed745628876485ee446d908

Slide 7

Slide 7 text

Eddystone-UID 44 25 60 DA 34 BD 20 4A 9E D7 00 00 00 00 00 01 Eddystone #1 44 25 60 DA 34 BD 20 4A 9E D7 00 00 00 00 00 02 Eddystone #2 44 25 60 DA 34 BD 20 4A 9E D7 00 00 00 00 00 03 Eddystone #3 44 25 60 DA 34 BD 20 4A 9E D7 00 00 00 00 00 04 Eddystone #4 Namespace ID Instance ID sha1(newcircle.com)X=X442560da34bd204a9ed745628876485ee446d908

Slide 8

Slide 8 text

Eddystone Scanner // Eddystone service uuid (0xfeaa)
 private static final ParcelUuid UID_SERVICE =
 ParcelUuid.fromString("0000feaa-0000-1000-8000-00805f9b34fb");
 
 // Include the namespace id to filter
 private static final byte[] NAMESPACE_FILTER = { /* 0x0000d89bed6e130ee5cf1ba1000000000000 */ };
 
 // Bitmask to apply filter just to namespace id
 private static final byte[] NAMESPACE_FILTER_MASK = { /* 0xff00ffffffffffffffffffff000000000000 */ }; ScanFilter beaconFilter = new ScanFilter.Builder()
 .setServiceUuid(UID_SERVICE)
 .setServiceData(UID_SERVICE, NAMESPACE_FILTER, NAMESPACE_FILTER_MASK)
 .build();X
 List filters = Collections.singletonList(beaconFilter);
 
 ScanSettings settings = new ScanSettings.Builder()
 .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
 .build();

Slide 9

Slide 9 text

Eddystone Scanner // Eddystone service uuid (0xfeaa)
 private static final ParcelUuid UID_SERVICE =
 ParcelUuid.fromString("0000feaa-0000-1000-8000-00805f9b34fb");
 
 // Include the namespace id to filter
 private static final byte[] NAMESPACE_FILTER = { /* 0x0000d89bed6e130ee5cf1ba1000000000000 */ };
 
 // Bitmask to apply filter just to namespace id
 private static final byte[] NAMESPACE_FILTER_MASK = { /* 0xff00ffffffffffffffffffff000000000000 */ }; ScanFilter beaconFilter = new ScanFilter.Builder()
 .setServiceUuid(UID_SERVICE)
 .setServiceData(UID_SERVICE, NAMESPACE_FILTER, NAMESPACE_FILTER_MASK)
 .build();X
 List filters = Collections.singletonList(beaconFilter);
 
 ScanSettings settings = new ScanSettings.Builder()
 .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
 .build();

Slide 10

Slide 10 text

Eddystone Scanner Nearby Messages API BluetoothManager manager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE);
 BluetoothLeScanner scanner = manager.getAdapter().getBluetoothLeScanner();
 scanner.startScan(filters, settings, mScanCallback); private ScanCallback mScanCallback = new ScanCallback() {
 @Override
 public void onScanResult(int callbackType, ScanResult result) {
 byte[] data = result.getScanRecord().getServiceData(UID_SERVICE); //…parse UID namespace + instance…
 }
 …
 };

Slide 11

Slide 11 text

Eddystone-TLM … 16 FEAA 20 … BATT TEMP ADV_CNT ELAPSED <> <> 03 03 FEAA Battery Voltage Beacon Temperature Advertisement Count Elapsed Seconds Since Power-On

Slide 12

Slide 12 text

Proximity Beacon API Beacon Metadata (Attachments) Beacon Provisioning Beacon Diagnostics

Slide 13

Slide 13 text

Proximity Beacon API Beacon Metadata (Attachments) Beacon Provisioning Beacon Diagnostics

Slide 14

Slide 14 text

Eddystone-URL http://newcircle.com/android

Slide 15

Slide 15 text

Eddystone-URL http:// n e w c i r c l e .com/ a n d r o i d 02 6E 65 77 63 69 72 63 6C 65 00 61 6E 64 72 6F 69 64 http://newcircle.com/android → http://goo.gl/BhqDJb

Slide 16

Slide 16 text

The Physical Web

Slide 17

Slide 17 text

The Physical Web "Walk up and use anything"

Slide 18

Slide 18 text

Physical Web Architecture PW Client (Scanner) PW Service (Optional) WWW Eddystone Advertiser mDNS Advertiser UPnP Advertiser SSDP Advertiser

Slide 19

Slide 19 text

Physical Web Architecture PW Client (Scanner)

Slide 20

Slide 20 text

Physical Web Architecture PW Client (Scanner) ?

Slide 21

Slide 21 text

Physical Web Architecture PW Client (Scanner) PW Service (Optional) WWW Eddystone Advertiser mDNS Advertiser UPnP Advertiser SSDP Advertiser

Slide 22

Slide 22 text

Physical Web Architecture PW Service (Optional) Fetches URL Metadata Potentially Filter Malicious URLs Proxy Link Follows

Slide 23

Slide 23 text

Physical Web Architecture PW Client (Scanner) PW Service (Optional) WWW Eddystone Advertiser mDNS Advertiser UPnP Advertiser SSDP Advertiser

Slide 24

Slide 24 text

Deep Linking 
 
 
 
 
 


Slide 25

Slide 25 text

App Indexing 
 
 …
 
 
 …
 
 … http://goo.gl → Provides automatic follows of indexed URLs

Slide 26

Slide 26 text

App Invites (Beta) • Shareable direct links to download/install application • G+ link that redirects to the appropriate app store • Acts as a deep link if already installed

Slide 27

Slide 27 text

Learn More • Physical Web demo apps + documentation: https://github.com/google/physical-web • Google beacon specifications: https://github.com/google/eddystone • Additional Samples: http://milehighandroid.com • Videos/Tutorials: • NewCircle BLE Android Tutorial: https://goo.gl/IFzQ3Y • NewCircle BLe Lollipop Tutorial: https://goo.gl/Md9ZkA • Google Using Nearby with Beacons: https://www.youtube.com/watch?v=7InjJGqP15E • Google Developing with Beacons: https://www.youtube.com/watch?v=s-4J7cijPAo

Slide 28

Slide 28 text

Grab Some Beacons