Using mobile device features


#1

Hi all,
I am considering using PlayCanvas for my new project. It is aimed for mobile devices only. My project will require two utilities:

  • using device’s build in cameras, previewing image from the cam
  • Bluetooth communication with external device
    I did not find any materials if these functionalities are available with PlayCanvas. Could you please tell me if it is possible?

#2

PlayCanvas does not expose the functionality you describe in the engine itself. Instead, you need to simply leverage the relevant browser APIs:

It looks like the Bluetooth API is still heavily in development. I believe Chrome will debut support first. Check out the status of their current support here:

https://www.chromestatus.com/feature/5264933985976320

Looks like you need to enable the feature in chrome://flags


#3

So how would I now call this browser functionality from my project?


#4

The standard web tutorials will work fine.