Harold
Harold

Reputation: 1794

Why might navigator.bluetooth be undefined?

Tablet: Lenovo tab4 8

Android version: 8.1

Android Chrome version: 76.0.3809.111

Bluetooth 'switch' in Settings is turned on.

Site is being served over https://

And yet: navigator.bluetooth is undefined


Is there any other setting or something that I may be missing?

Thanks in advance for your time and consideration.

Upvotes: 1

Views: 3081

Answers (1)

Harold
Harold

Reputation: 1794

It turned out that navigator.bluetooth in fact was not undefined - instead the Google Closure JS compiler (which we use for optimization/minimization) was minify-ing navigator.bluetooth to navigator.uG, and navigator.uG was undefined.

This was easily corrected by specifying externs.

Not a web-bluetooth problem after all, but perhaps this will be helpful to some future searcher.

Take care.

Upvotes: 3

Related Questions