菜鸟教程小白 发表于 2022-12-13 02:24:11

android - 在 Haxe NME 中使用蓝牙


                                            <p><p>我打算使用 Haxe NME 开发一个简单的蓝牙聊天应用程序。</p>

<p>是否可以在 Haxe 中使用特定于设备的原生 API?或者是否有一些包装类可用于使用蓝牙?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>使用蓝牙协议(protocol)的准入阈值相当高,对于跨平台的聊天应用程序而言,这不是一种常用的轻松通信方法。
例如看这个不支持蓝牙的框架对比图;
<a href="http://www.markus-falk.com/mobile-frameworks-comparison-chart/" rel="noreferrer noopener nofollow">http://www.markus-falk.com/mobile-frameworks-comparison-chart/</a> </p>

<p>更常用的是套接字网络连接,您可以查看一个使用nme 的聊天应用程序示例,它可以很好地跨平台运行<a href="https://github.com/RealyUniqueName/StablexNet" rel="noreferrer noopener nofollow">https://github.com/RealyUniqueName/StablexNet</a> </p>

<p>我确信可以编写一个原生扩展,但我不希望很快看到一个,因为它并不那么简单。如果你想接受挑战,也许你可以考虑为 <a href="http://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html" rel="noreferrer noopener nofollow">http://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html</a> 写一个扩展。 </p>

<p>蓝牙更普遍地与蓝牙配置文件和为其设计的外围设备一起使用<a href="http://en.wikipedia.org/wiki/Bluetooth_profile" rel="noreferrer noopener nofollow">http://en.wikipedia.org/wiki/Bluetooth_profile</a> .</p></p>
                                   
                                                <p style="font-size: 20px;">关于android - 在 Haxe NME 中使用蓝牙,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/16125774/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/16125774/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: android - 在 Haxe NME 中使用蓝牙