Re: [web-bluetooth] errorSecurityError: Origin is not allowed to access the service. Tip: Add the service UUID to 'optionalServices' in requestDevice() options. https://goo.gl/HxfxSQ

On android 7.1.1, acceptAllDevices = true is invalid and must be written in filters, such as the filter device name, Services must be written to be able to run, and 6.0 will not be
 
------------------ Original ------------------
From:  "François Beaufort"<notifications@github.com>;
Date:  Tue, Jul 18, 2017 09:27 PM
To:  "WebBluetoothCG/web-bluetooth"<web-bluetooth@noreply.github.com>; 
Cc:  "Zhangrui"<brave.z@a.kitchen>; "Author"<author@noreply.github.com>; 
Subject:  Re: [WebBluetoothCG/web-bluetooth] errorSecurityError: Origin is notallowed to access the service. Tip: Add the service UUID to 'optionalServices'in requestDevice() options. https://goo.gl/HxfxSQ (#370)

 

If you use acceptAllDevices: true and your filters don't include 00000000-0000-1000-8000-00805f9b34fb you may want to use optionalServices as in https://googlechrome.github.io/samples/web-bluetooth/read-characteristic-value-changed.html
 
I guess something like this should work:
   options.acceptAllDevices = true;   options.optionalServices = ['00000000-0000-1000-8000-00805f9b34fb'];
 
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

-- 
GitHub Notification of comment by brave2016
Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/370#issuecomment-316243070 using your GitHub account

Received on Wednesday, 19 July 2017 01:10:32 UTC