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

The Physical Web: A Sneak Peak into the Future of IoT and Mobility

The Physical Web: A Sneak Peak into the Future of IoT and Mobility

jinqian

July 04, 2016
Tweet

More Decks by jinqian

Other Decks in Technology

Transcript

  1. The Physical Web: A Sneak Peak into the Future of

    IoT and Mobility Qian // XKE 201607
  2. Agenda What’s The Physical Web? BLE Beacons: iBeacon & Eddystone

    Google Tools & APIs for Beacon Web bluetooth API Takeaways
  3. Bluetooth Low Energy Bluetooth Smart / Bluetooth 4.0 Small Size

    & Low Cost Low Power Requirements Native OS support: iOS 5+, Android 4.3+
  4. Beacon Signal Characteristics Tx Power: Transmit Power dBm: decibel-milliwatts Advertising

    Interval RSSI: Received Signal Strength Indicator Measured Power
  5. Field Size Description UUID 16 bytes Application developers should define

    a UUID specific to their app and deployment use case. Major 2 bytes Further specifies a specific iBeacon and use case. For example, this could define a sub-region within a larger region defined by the UUID. Minor 2 bytes Allows further subdivision of region or use case, specified by the application developer.
  6. public class MyApplication extends Application { private BeaconManager beaconManager; @Override

    public void onCreate() { super.onCreate(); beaconManager = new BeaconManager(getApplicationContext()); beaconManager.connect(new BeaconManager.ServiceReadyCallback() { @Override public void onServiceReady() { beaconManager.startMonitoring(new Region( "monitored region", UUID.fromString(“B9407F30-F5F8-466E-AFF9-25556B57FE6D"), 22504, 48827) ); } }); } }
  7. Store Location San Francisco Paris London UUID D9B9EC1F-3925-43D0-80A9-1E39D4CEA95C Major 1

    2 3 Minor Clothing 10 10 10 Housewares 20 20 20 Automotive 30 30 30
  8. Google Tools & APIs for Beacon Beacon Dashboard Beacon Tool

    App Proximity Beacon API Nearby Message API
  9. Method Description activate POST /v1beta1/{beaconName=beacons/*}:activat Activates a beacon. deactivate POST

    /v1beta1/{beaconName=beacons/*}:deactivat Deactivates a beacon. decommission POST /v1beta1/{beaconName=beacons/*}:decommissio Decommissions the specified beacon in the service. delete DELETE /v1beta1/{beaconName=beacons/* Deletes the specified beacon including all diagnostics data for the beacon as well as any attachments on the beacon (including those belonging to other projects). get GET /v1beta1/{beaconName=beacons/* Returns detailed information about the specified beacon. list GET /v1beta1/beacon Searches the beacon registry for beacons that match the given search criteria. registe POST /v1beta1/beacons:registe Registers a previously unregistered beacon given its advertisedI . update PUT /v1beta1/{beacon.beaconName=beacons/* Updates the information about the specified beacon.
  10. https://proximitybeacon.googleapis.com/v1beta1/beacons?q=status:active { "beacons": [ { "status": "ACTIVE", "description": "Dot Beacon,

    reporting for duty!", "indoorLevel": { "name": "1" }, "latLng": { "latitude": 47.669377099999998, "longitude": -122.1966037 }, "placeId": "ChIJTxax6NoSkFQRWPvFXI1LypQ", "advertisedId": { "type": "EDDYSTONE", "id": "hZ3uYXQBwm2IsAAAAAAAyA==" }, "beaconName": "beacons/0123abcd4567efgh890", "expectedStability": "STABLE", "properties": { "type": "Radius Dot beacon", "location": "Entryway" } } ], "nextPageToken": "", "totalCount": "3" }
  11. Nearby Message API Subscribe to BLE beacon messages - Foreground,

    in response to a user action or event - Background, when your app is not running
  12. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ... mMessageListener = new

    MessageListener() { @Override public void onFound(Message message) {} @Override public void onLost(Message message) {} } } // Subscribe to receive messages. private void subscribe() { Log.i(TAG, "Subscribing."); SubscribeOptions options = new SubscribeOptions.Builder() .setStrategy(Strategy.BLE_ONLY) .build(); Nearby.Messages.subscribe(mGoogleApiClient, mMessageListener, options); }
  13. // Subscribe to messages in the background. private void backgroundSubscribe()

    { Log.i(TAG, "Subscribing for background updates."); SubscribeOptions options = new SubscribeOptions.Builder() .setStrategy(Strategy.BLE_ONLY) .build(); Nearby.Messages.subscribe(mGoogleApiClient, getPendingIntent(), options); } private PendingIntent getPendingIntent() { return PendingIntent.getBroadcast(this, 0, new Intent(this, BeaconMessageReceiver.class), PendingIntent.FLAG_UPDATE_CURRENT); } @Override public void onReceive(Context context, Intent intent) { Nearby.Messages.handleIntent(intent, new MessageListener() { @Override public void onFound(Message message) {} @Override public void onLost(Message message) {} }); }
  14. <button id="the-button">Try it</button> const button = document.querySelector('#the-button'); button.addEventListener('click', function() {

    navigator.bluetooth.requestDevice({ filters: [{ services: ['battery_service'] }] }).then(device => { console.log('Got device:', device.name); console.log('id:', device.id); }); }); GATT Service Filter Generic Attribute Profile
  15. Future of Mobility & IoT Pervasive, Ubiquitous, Contextual Proximity FTW

    Google Services / Ecosystem Battle between the giants Change how marketing would work
  16. “The developer event for Ubiquitous Computing and IoT covering Brillo,

    Weave, Android Wear, Beacons, Google Cast, Android TV, and Android Auto.”
  17. • Engaging with the Real World: Web Bluetooth and Physical

    Web (Chrome Dev Summit 2015) • Introduction to the Physical Web (Ubiquity Dev Summit 2016)