Re: [web-bluetooth] Have sites explicitly watch for advertisements on paired devices.

If we really want these two steps, I'd advise for consistency with 
`startNotifications()/stopNotifications()` and make 
`watchingAdvertisements` a function like 
`startWatchingAdvertisements()/stopWatchingAdvertisements()`:

```js
var known_service = "A service in the iBeacon’s GATT server";
return navigator.bluetooth.requestDevice({
  filters: [{services: [known_service]}]
}).then(device => {
  device.startWatchingAdvertisements();
  device.addEventListener('advertisementreceived', interpretIBeacon);
});

// Later on...
device.stopWatchingAdvertisements();
```

-- 
GitHub Notification of comment by beaufortfrancois
Please view or discuss this issue at 
https://github.com/WebBluetoothCG/web-bluetooth/pull/235#issuecomment-216771845
 using your GitHub account

Received on Wednesday, 4 May 2016 08:02:50 UTC