{"action":"created","issue":{"url":"https://api.github.com/repos/devunwired/accessory-samples/issues/2","labels_url":"https://api.github.com/repos/devunwired/accessory-samples/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/devunwired/accessory-samples/issues/2/comments","events_url":"https://api.github.com/repos/devunwired/accessory-samples/issues/2/events","html_url":"https://github.com/devunwired/accessory-samples/issues/2","id":55786099,"number":2,"title":"Legacy BLE and >= SDK 21 BLE","user":{"login":"tpitman","id":2906563,"avatar_url":"https://avatars.githubusercontent.com/u/2906563?v=3","gravatar_id":"","url":"https://api.github.com/users/tpitman","html_url":"https://github.com/tpitman","followers_url":"https://api.github.com/users/tpitman/followers","following_url":"https://api.github.com/users/tpitman/following{/other_user}","gists_url":"https://api.github.com/users/tpitman/gists{/gist_id}","starred_url":"https://api.github.com/users/tpitman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpitman/subscriptions","organizations_url":"https://api.github.com/users/tpitman/orgs","repos_url":"https://api.github.com/users/tpitman/repos","events_url":"https://api.github.com/users/tpitman/events{/privacy}","received_events_url":"https://api.github.com/users/tpitman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-28T17:16:57Z","updated_at":"2015-01-31T06:01:49Z","closed_at":"2015-01-31T06:01:49Z","body":"I have an app that currently works with BLE on < Lollipop devices. When I do the startLeScan with no UUID array it finds my BLE device just fine. If I pass the same service ID for that device into the startLeScan it doesn't find it.\r\n\r\nThis same thing works fine on a < Lollipop device. Should this work? I am asking you because you have your new Lollipop version of the BLE in your example and thought you would know."},"comment":{"url":"https://api.github.com/repos/devunwired/accessory-samples/issues/comments/72306270","html_url":"https://github.com/devunwired/accessory-samples/issues/2#issuecomment-72306270","issue_url":"https://api.github.com/repos/devunwired/accessory-samples/issues/2","id":72306270,"user":{"login":"devunwired","id":215725,"avatar_url":"https://avatars.githubusercontent.com/u/215725?v=3","gravatar_id":"","url":"https://api.github.com/users/devunwired","html_url":"https://github.com/devunwired","followers_url":"https://api.github.com/users/devunwired/followers","following_url":"https://api.github.com/users/devunwired/following{/other_user}","gists_url":"https://api.github.com/users/devunwired/gists{/gist_id}","starred_url":"https://api.github.com/users/devunwired/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devunwired/subscriptions","organizations_url":"https://api.github.com/users/devunwired/orgs","repos_url":"https://api.github.com/users/devunwired/repos","events_url":"https://api.github.com/users/devunwired/events{/privacy}","received_events_url":"https://api.github.com/users/devunwired/received_events","type":"User","site_admin":false},"created_at":"2015-01-31T06:01:49Z","updated_at":"2015-01-31T06:01:49Z","body":"AOSP may be able to help in the matter:\r\nhttps://android.googlesource.com/platform/frameworks/base/+/android-5.0.2_r1/core/java/android/bluetooth/BluetoothAdapter.java\r\n\r\nIf you take a look at how they've mapped `startLeScan()` (line ~1656)to used the new APIs underneath, you can see that when an array of UUIDs is passed to the method, they map that into the new `ScanFilter` API. However, it seems they only take the first element, so if you were passing multiple UUIDs before it looks like anything but the first will be dropped.\r\n\r\nIf you are only passing one UUID, then it should work (and does work in the testing I have done). The callback does also doe a secondary match between detected UUIDs and the original array, so if a mismatch occurs there with the new APIs, the scan results would be dropped as well.\r\n\r\nHope that helps."}}