W3C home > Mailing lists > Public > public-web-bluetooth-log@w3.org > May 2016

Re: [web-bluetooth] Allow requestDevice for all devices

From: Vincent Scheib via GitHub <sysbot+gh@w3.org>
Date: Wed, 25 May 2016 19:51:03 +0000
To: public-web-bluetooth-log@w3.org
Message-ID: <issue_comment.created-221686911-1464205863-sysbot+gh@w3.org>
So, perhaps developers will solve this with something such as:

```
navigator.bluetooth.requestDevice({
  filters: [
    { name: '' },
    { namePrefix: '0' },
    { namePrefix: '1' },
    { namePrefix: '2' },
    { namePrefix: '3' },
    { namePrefix: '4' },
    { namePrefix: '5' },
    { namePrefix: '6' },
    { namePrefix: '7' },
    { namePrefix: '8' },
    { namePrefix: '9' },
    { namePrefix: 'a' },
    { namePrefix: 'b' },
    { namePrefix: 'c' },
    { namePrefix: 'd' },
    { namePrefix: 'e' },
    { namePrefix: 'f' },
    { namePrefix: 'g' },
    { namePrefix: 'h' },
    { namePrefix: 'i' },
    { namePrefix: 'j' },
    { namePrefix: 'k' },
    { namePrefix: 'l' },
    { namePrefix: 'm' },
    { namePrefix: 'n' },
    { namePrefix: 'o' },
    { namePrefix: 'p' },
    { namePrefix: 'q' },
    { namePrefix: 'r' },
    { namePrefix: 's' },
    { namePrefix: 't' },
    { namePrefix: 'u' },
    { namePrefix: 'v' },
    { namePrefix: 'w' },
    { namePrefix: 'x' },
    { namePrefix: 'y' },
    { namePrefix: 'z' },
    { namePrefix: 'A' },
    { namePrefix: 'B' },
    { namePrefix: 'C' },
    { namePrefix: 'D' },
    { namePrefix: 'E' },
    { namePrefix: 'F' },
    { namePrefix: 'G' },
    { namePrefix: 'H' },
    { namePrefix: 'I' },
    { namePrefix: 'J' },
    { namePrefix: 'K' },
    { namePrefix: 'L' },
    { namePrefix: 'M' },
    { namePrefix: 'N' },
    { namePrefix: 'O' },
    { namePrefix: 'P' },
    { namePrefix: 'Q' },
    { namePrefix: 'R' },
    { namePrefix: 'S' },
    { namePrefix: 'T' },
    { namePrefix: 'U' },
    { namePrefix: 'V' },
    { namePrefix: 'W' },
    { namePrefix: 'X' },
    { namePrefix: 'Y' },
    { namePrefix: 'Z' }
  ],
  optionalServices: ['generic_access']
})
```

And, perhaps that's better / nearly equivalent to the obvious intent 
and ugliness of `filters: [{ 
'listAllDevicesEvenThoughItIsAPoorUserExperience': true }],`

I'm happy having just thought of that, knowing that a device rename 
tool should be possible no matter how we decide the syntax here.

-- 
GitHub Notification of comment by scheib
Please view or discuss this issue at 
https://github.com/WebBluetoothCG/web-bluetooth/issues/234#issuecomment-221686911
 using your GitHub account
Received on Wednesday, 25 May 2016 19:51:06 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 25 May 2016 19:51:06 UTC