- From: jfarfel via GitHub <sysbot+gh@w3.org>
- Date: Fri, 05 Aug 2016 20:50:20 +0000
- To: public-web-bluetooth-log@w3.org
> Sorry, I meant that ScanFilter.Builder.setManufacturerData(id, data, mask) <https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setManufacturerData(int,%20byte%5B%5D,%20byte%5B%5D)> requires that the advertised data be exactly as long as the array you provide, rather than letting it be a prefix or suffix. I think the data you provide can be a prefix of the full Mfg Data in the advertisement. Also, Eddystone data is in Service Data, not Mfg Data. So you'd want setServiceData(uuid, data, mask) <https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceData(android.os.ParcelUuid, byte[], byte[])>. But the same thing still applies - you can give a prefix (but not a suffix). See code: http://cs/android/frameworks/base/core/java/android/bluetooth/le/ScanFilter.java?l=354&rcl=fcaee13dee3ef23e9855b77154de266770a49705 > For example, you can't scan for Eddystone URL packets using the Android filter format without also getting all other Eddystone types. Because it can be a prefix, I believe that you can indeed do this (since the type is in a consistent spot in the service data). On Fri, Aug 5, 2016 at 11:34 AM, Jeffrey Yasskin <notifications@github.com> wrote: > Sorry, I meant that ScanFilter.Builder.setManufacturerData(id, data, mask) > <https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setManufacturerData(int,%20byte%5B%5D,%20byte%5B%5D)> > requires that the advertised data be exactly as long as the array you > provide, rather than letting it be a prefix or suffix. For example, you > can't scan for Eddystone URL packets using the Android filter format > without also getting all other Eddystone types. > > That change won't be in this PR. I'll figure it out and change both > scanning.bs and index.bs in some other PR. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/WebBluetoothCG/web-bluetooth/pull/265#issuecomment-237928547>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AAwHPsRp8hPxFBlrTuW_SpZTu4MXvqQVks5qc4I6gaJpZM4JcOvn> > . > -- GitHub Notification of comment by jfarfel Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/pull/265#issuecomment-237962648 using your GitHub account
Received on Friday, 5 August 2016 20:52:23 UTC