How to use Bluetooth Plugin (beta r145)

  • Hi,

    I have been trying the bluetooth demo project available on the beta r145, But it doesn't work correctly on android devices.

    Is there any manual with its commands and functions?

    How can i make it work on android devices?

    Thanks in advance! :)

    Tagged:

  • Do you have an Android 6+ device? The implementation status says it requires Android 6.0 or later, so if you test on an Android 5 device it won't work.

  • Hi Ashely,

    my device is an Android 8.1, and when i try to 'Request Device' it always fails (Requesting device failed). I have tried on windows and macOS, and it works fine.

    Any possible solution to make it work?

    Thanks! :)

  • I don't know why that would happen, sorry. I tried it on a Pixel 3 with Android 9 and it seemed to work fine. Maybe you could connect USB debugging and see if it logged any console messages about it.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ashley a side-question, is local Web WiFi networking, for example standalone local LAN multiplayer, already viable for HTML5 Games? If yes, can you link some resources. Thank you.

  • This is a thread about Bluetooth... I'm confused, is that question supposed to have anything to do with Bluetooth?

  • Going back to bluetooth,

    I've tried another device and it worked correctly on remote preview, but when i try an exported version, it doesn't work.

    Exporting it to web(HTML5) and uploading to my web host, it should work, shouldn't it? Because when i did that it says that it's not supported or it fails on devices that the preview worked correctly.

    And exporting it to apk it should work, or it only works on web because web-bluetooth only works on browser?

    this is the web where i uploaded the exported version: http://test.costajoan.com/

    Thank you in advance!

  • That's an insecure (HTTP) server. Most modern web features only work on secure (HTTPS) servers.

    According to the implementation status the Android Webview is not currently supported, so it won't work in APKs, but they say it should be supported in future.

  • Hi,

    Still on the topic of bluetooth, I'm wondering if this plugin allows the use of smartphones as gamepad via bluetooth.

    I'm currently developing a game since last year using smartphones as gamepad and, as you can guess, we encountered lots of problems while trying to get the phones working as gamepad for a fast pace game for up to four players. We explored (almost) every possibility for it (AirConsole, webRTC, websocket) and the most stable result is actually the use of a local websocket server with TCP communications. Although, there are sometimes a few lags and the connection process is far from convenient. That's why I'm inquiring about this new plugin.

    Does anybody have an idea whether this plugin allows 1) a fast communication between a smartphone and a computer and 2) the use of UDP to communicate to the computer the state of each button on the phone screen?

    I admit I had a ray of hope when I saw that a proper bluetooth plugin was implemented since our current solution is far from perfect. I just hope this technology can work in our case!

    Thanks a lot for your insights.

    Telecs

  • Hi,

    Still on the topic of bluetooth, I'm wondering if this plugin allows the use of smartphones as gamepad via bluetooth.

    I'm currently developing a game since last year using smartphones as gamepad and, as you can guess, we encountered lots of problems while trying to get the phones working as gamepad for a fast pace game for up to four players. We explored (almost) every possibility for it (AirConsole, webRTC, websocket) and the most stable result is actually the use of a local websocket server with TCP communications. Although, there are sometimes a few lags and the connection process is far from convenient. That's why I'm inquiring about this new plugin.

    Does anybody have an idea whether this plugin allows 1) a fast communication between a smartphone and a computer and 2) the use of UDP to communicate to the computer the state of each button on the phone screen?

    I admit I had a ray of hope when I saw that a proper bluetooth plugin was implemented since our current solution is far from perfect. I just hope this technology can work in our case!

    Thanks a lot for your insights.

    Telecs

    Hi,

    I'm working on the same solution, tried websocket on local server (ws:// and not wss://), I'm wondering if you succeed making a local wss server for websocket, because this will allows me to use iOS mobiles also.

    Back to Bluetooth plugin, I was happy learning that C3 has built in Bluetooth plugin, I hope someone come with a complete tutorial from pairing to communication between two or three devices, I think this will provide better solution for local multiplayer.

    My question for Ashley: speaking about latency for two players connected to the same WIFI router , can you confirm if Bluetooth plugin is better than Multiplayer one? Thanks.

  • I'm working on the same solution, tried websocket on local server (ws:// and not wss://), I'm wondering if you succeed making a local wss server for websocket, because this will allows me to use iOS mobiles also.

    On this side note, I don't think I'm currently using any secure connection for the server. But I'm sure the iOS players can also connect to the server with the same process as android users. If you wish to discuss this subject further, perhaps could you create a new topic? I would gladly share what was my process so far.

    Telecs

  • > I'm working on the same solution, tried websocket on local server (ws:// and not wss://), I'm wondering if you succeed making a local wss server for websocket, because this will allows me to use iOS mobiles also.

    On this side note, I don't think I'm currently using any secure connection for the server. But I'm sure the iOS players can also connect to the server with the same process as android users. If you wish to discuss this subject further, perhaps could you create a new topic? I would gladly share what was my process so far.

    Telecs

    Not necessary creating another topic.

    iOS 12.2 limited access to accelerometer/gyroscope from unsecured connection, on android we still able to get mobile gyroscope data and send it over websocket to PC. That's why i'm looking for a local wss server, this will allows me get gyroscope data from both android and iOS.

    Coming back to Bluetooth plugin, I'm trying to find out how to use it, maybe this will solve my problem.

  • Just spotted we now have bluetooth support!? Very cool :)

    Just wondering if it would work with a cordova ios export?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)