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

Eddystone - Droidcon Paris 2015

Turhan OZ
November 10, 2015

Eddystone - Droidcon Paris 2015

Talk I gave during DroidconParis 2015

Turhan OZ

November 10, 2015
Tweet

More Decks by Turhan OZ

Other Decks in Technology

Transcript

  1. Who am I ? ❖ Turhan OZ ❖ turhanoz.com ❖

    @TurhanOz ❖ @ParisAndroidUG
  2. Eddystone-UID Service UUID … OxO3 OxO3 0xFEAA Service Data …

    Ox16 OxFEAA 0x00 Tx Namespace ID (10 bytes) Instance ID (6 bytes) Beacon1 e83bda0408d0802c61b8 a000000000001 Beacon2 e83bda0408d0802c61b8 a000000000002 Beacon3 e83bda0408d0802c61b8 a000000000003 ❖ Instance ID ❖ sha1 (droidcon.fr) = e83bda0408d0802c61b8a258a065d56bef3f43ac
  3. Eddystone-URL Service UUID … OxO3 OxO3 0xFEAA Service Data …

    Ox16 OxFEAA 0x10 Tx URL Scheme Encoded URL (up to 17 bytes) URL Scheme Prefix 0x00 http://www. 0x01 https://www. 0x02 http:// 0x03 https:// Url extension 0x00 .com/ 0x01 .org/ 0x02 .edu/ … … ❖ http://www.droidcon.com/paris http://www. d r o i d c o n .com/ p a r i s 0x00 0x64 0x72 0x6F 0x69 0x64 0x63 0x6F 0x6E 0x00 0x70 0x61 0x72 0x69 0x73
  4. Eddystone-TLM Service UUID … OxO3 OxO3 0xFEAA Service Data …

    Ox16 OxFEAA 0x20 Tx Battery Voltage Temp Count Time since power
  5. Eddystone Scanning BluetoothManager manager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE); BluetoothLeScanner scanner =

    manager.getAdapter().getBluetoothLeScanner(); scanner.startScan(filters, settings, scanCallback); //Eddystone service UUID private static final ParcelUuid UID_SERVICE = ParcelUuid.fromString("0000feaa-0000-1000-8000-00805f9b34fb"); ScanFilter beaconFilter = new ScanFilter.Builder() .setServiceUuid(UID_SERVICE) .setServiceData(UID_SERVICE, FRAME_FILTER_ON_URL, FILTER_MASK_ON_FRAME_TYPE) .build(); List<ScanFilter> filters = Collections.singletonList(beaconFilter); public static final byte[] FRAME_FILTER_ON_URL = { /* 0x100000000000000000000000000000000000 */ }; public static final byte[] FILTER_MASK_ON_FRAME_TYPE = { /* 0xFF0000000000000000000000000000000000 */ }; Service UUID … OxO3 OxO3 0xFEAA Service Data … Ox16 OxFEAA 0x10 Tx URL Scheme Encoded URL (up to 17 bytes)
  6. Eddystone Scanning BluetoothManager manager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE); BluetoothLeScanner scanner =

    manager.getAdapter().getBluetoothLeScanner(); scanner.startScan(filters, settings, scanCallback); private ScanCallback scanCallback = new ScanCallback() { @Override public void onScanResult(int callbackType, ScanResult result) { byte[] serviceDate = result.getScanRecord().getServiceData(UID_SERVICE); } @Override public void onBatchScanResults(List<ScanResult> results) {} @Override public void onScanFailed(int errorCode) {} };
  7. Proximity Beacon REST Api beacons beaconinfo namespaces diagnotics attachments getforobserved

    create list delete batchDelete list list get list update register decommission activate deactivate https://developers.google.com/beacons/proximity/reference/rest/ https://github.com/TurhanOz/RxProximityBeacon
  8. Sum-up ❖ beacon: hardware that advertises data ❖ Eddystone™: open

    Bluetooth® beacon format from Google ❖ UID ❖ URL (Physical Web) ❖ TLM ❖ Beacon Platform: Enhance (attachments, location) and Monitor ❖ Proximity Beacon REST API ❖ Client Side ❖ Nearby Messages API, Places API (& Proximity Beacon API)