1
votes

I am trying to build an extension that interacts with certain webpages. While browsing on those webpages i need to connect to a smartphone app via Bluetooth if the user wants to run a certain function of the extension.

AFAIK Chrome extension can interact with websites while Chrome apps are like stand alone programs. But the Bluetooth API is only available to apps?

So is there any way to do this? Can I for example have a hybrid of an extension and an app? (e.g. by using the same background script to communicate)

1

1 Answers

2
votes

You can use an extension AND an app that talk to each other with external messages. A message from an extension will wake up the app's event page even if it's unloaded. It will be up to the user to install both at the same time, though.

Alternatively, you can embed a browser page in your app via the <webview> tag. In this case you can communicate with the embedded page, but you can't do it while user browses normally.