Forum Academy Marketplace Showcase Pricing Features

Javascript to Bubble Plugin + Bluetooth Help

Hello all,

I am currently using javascript to embed Bluetooth connectivity on my Web App. I have a button (let’s call this the ‘Connect’ button) that allows you to connect to a Bluetooth sensor. Once a connection has been established, a ‘Start’ and ‘Disconnect’ button becomes visible. My question is: how do I pass the Bluetooth device from one javascript to another? For example, passing the established Bluetooth connection from the javascript of the ‘Connect’ button to the javascript in the workflow of the ‘Disconnect’ button? Any help would be much appreciated!

maybe assign the bluetooth instance to the window scope? instead of const bluetooth = you can try window.bluetooth =